From 7d500a3b0e53eee041306b54d4ec8fcc6d7e4d0f Mon Sep 17 00:00:00 2001 From: yuruo Date: Thu, 6 Mar 2025 16:49:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=A9=BA=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradio_ui/tools/computer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradio_ui/tools/computer.py b/gradio_ui/tools/computer.py index 31d89c4..9ae6d8f 100644 --- a/gradio_ui/tools/computer.py +++ b/gradio_ui/tools/computer.py @@ -229,6 +229,7 @@ class ComputerTool(BaseAnthropicTool): return x, y except requests.exceptions.RequestException as e: raise ToolError(f"An error occurred while trying to execute the command: {str(e)}") + async def screenshot(self): if not hasattr(self, 'target_dimension'): screenshot = self.padding_image(screenshot) @@ -249,7 +250,6 @@ class ComputerTool(BaseAnthropicTool): return padding_image def scale_coordinates(self, source: ScalingSource, x: int, y: int): - """Scale coordinates to a target maximum resolution.""" if not self._scaling_enabled: return x, y