computer-use-ootb-internal 0.0.98.post1__py3-none-any.whl → 0.0.99.post1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- computer_use_ootb_internal/app_teachmode.py +13 -3
- {computer_use_ootb_internal-0.0.98.post1.dist-info → computer_use_ootb_internal-0.0.99.post1.dist-info}/METADATA +1 -1
- {computer_use_ootb_internal-0.0.98.post1.dist-info → computer_use_ootb_internal-0.0.99.post1.dist-info}/RECORD +5 -5
- {computer_use_ootb_internal-0.0.98.post1.dist-info → computer_use_ootb_internal-0.0.99.post1.dist-info}/WHEEL +0 -0
- {computer_use_ootb_internal-0.0.98.post1.dist-info → computer_use_ootb_internal-0.0.99.post1.dist-info}/entry_points.txt +0 -0
@@ -6,6 +6,7 @@ import threading
|
|
6
6
|
import requests
|
7
7
|
import platform # Add platform import
|
8
8
|
import subprocess # Add subprocess import
|
9
|
+
import pyautogui # Add pyautogui import
|
9
10
|
from fastapi import FastAPI, Request
|
10
11
|
from fastapi.responses import JSONResponse
|
11
12
|
from fastapi.middleware.cors import CORSMiddleware
|
@@ -106,6 +107,15 @@ def prepare_environment(state):
|
|
106
107
|
# Use cmd /c start to open the URL in Edge without blocking
|
107
108
|
subprocess.run(["cmd", "/c", "start", "msedge", url], check=True, shell=False)
|
108
109
|
print(f"Successfully requested Edge to open {url}")
|
110
|
+
|
111
|
+
# Add pyautogui click after opening the browser
|
112
|
+
time.sleep(2) # Wait a bit for the browser to potentially load
|
113
|
+
screen_width, screen_height = pyautogui.size()
|
114
|
+
click_x = int(screen_width * (1036 / 1280))
|
115
|
+
click_y = int(screen_height * (500 / 720))
|
116
|
+
print(f"Clicking at coordinates: ({click_x}, {click_y})")
|
117
|
+
pyautogui.click(click_x, click_y)
|
118
|
+
|
109
119
|
except FileNotFoundError:
|
110
120
|
print("Error: Microsoft Edge not found. Please ensure it's installed and in PATH.")
|
111
121
|
except Exception as e:
|
@@ -139,6 +149,9 @@ async def update_parameters(request: Request):
|
|
139
149
|
|
140
150
|
log_ootb_request(shared_state.server_url, "update_params", data)
|
141
151
|
|
152
|
+
# Call the preparation function here, after parameters are updated
|
153
|
+
prepare_environment(shared_state)
|
154
|
+
|
142
155
|
return JSONResponse(
|
143
156
|
content={"status": "success", "message": "Parameters updated", "new_args": vars(shared_state.args)},
|
144
157
|
status_code=200
|
@@ -313,9 +326,6 @@ def process_input():
|
|
313
326
|
shared_state.is_paused = False
|
314
327
|
shared_state.stop_event.clear() # Ensure stop event is cleared at the start
|
315
328
|
|
316
|
-
# Call the preparation function before starting the loop
|
317
|
-
prepare_environment(shared_state)
|
318
|
-
|
319
329
|
print(f"start sampling loop: {shared_state.chatbot_messages}")
|
320
330
|
print(f"shared_state.args before sampling loop: {shared_state.args}")
|
321
331
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
computer_use_ootb_internal/README.md,sha256=FxpW95lyub2iX73ZDfK6ML7SdEKg060H5I6Grub7li4,31
|
2
|
-
computer_use_ootb_internal/app_teachmode.py,sha256=
|
2
|
+
computer_use_ootb_internal/app_teachmode.py,sha256=N2M7lGLwCezvZytdy884Cy1qF7C3pPGaF1FyayPnE3M,17756
|
3
3
|
computer_use_ootb_internal/app_teachmode_gradio.py,sha256=zAw-n3s20j1Jr0S4TzXHwllKV6APJ8HEHB1KqBuzriY,7907
|
4
4
|
computer_use_ootb_internal/dependency_check.py,sha256=y8RMEP6RXQzTgU1MS_1piBLtz4J-Hfn9RjUZg59dyvo,1333
|
5
5
|
computer_use_ootb_internal/example_websocket_js.html,sha256=BLYwDExVlgiAX4vXVXW3RuP5KD8FXE4EFXIl54bwF7w,1322
|
@@ -38,7 +38,7 @@ computer_use_ootb_internal/computer_use_demo/tools/computer_marbot.py,sha256=zZu
|
|
38
38
|
computer_use_ootb_internal/computer_use_demo/tools/edit.py,sha256=b0PwUitxckHCQqFP3ZwlthWdqNkn7WETeTHeB6-o98c,11486
|
39
39
|
computer_use_ootb_internal/computer_use_demo/tools/run.py,sha256=xhXdnBK1di9muaO44CEirL9hpGy3NmKbjfMpyeVmn8Y,1595
|
40
40
|
computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py,sha256=L8qfvtUkPPQGt92N-2Zfw5ZTDBzLsDps39uMnX3_uSA,6857
|
41
|
-
computer_use_ootb_internal-0.0.
|
42
|
-
computer_use_ootb_internal-0.0.
|
43
|
-
computer_use_ootb_internal-0.0.
|
44
|
-
computer_use_ootb_internal-0.0.
|
41
|
+
computer_use_ootb_internal-0.0.99.post1.dist-info/METADATA,sha256=KvfE1u3MumMHrbYvdCGhksJpFuqjbZAxA12qpmgrl3U,942
|
42
|
+
computer_use_ootb_internal-0.0.99.post1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
43
|
+
computer_use_ootb_internal-0.0.99.post1.dist-info/entry_points.txt,sha256=-AbmawU7IRQuDZihgVMVDrFoY4E6rnXYOUB-5vSeBKs,93
|
44
|
+
computer_use_ootb_internal-0.0.99.post1.dist-info/RECORD,,
|
File without changes
|