Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -86,7 +86,7 @@ except Exception as e:
|
|
86 |
raise
|
87 |
|
88 |
# Screenshot callback
|
89 |
-
def save_screenshot(memory_step: ActionStep, agent: CodeAgent) ->
|
90 |
from time import sleep
|
91 |
sleep(1.0)
|
92 |
driver = helium.get_driver()
|
@@ -111,8 +111,7 @@ def save_screenshot(memory_step: ActionStep, agent: CodeAgent) -> Image.Image:
|
|
111 |
memory_step.observations = (
|
112 |
url_info if memory_step.observations is None else memory_step.observations + "\n" + url_info
|
113 |
)
|
114 |
-
|
115 |
-
return image
|
116 |
|
117 |
# Initialize model and agent
|
118 |
model = LiteLLMModel("gemini/gemini-2.0-flash")
|
|
|
86 |
raise
|
87 |
|
88 |
# Screenshot callback
|
89 |
+
def save_screenshot(memory_step: ActionStep, agent: CodeAgent) -> str:
|
90 |
from time import sleep
|
91 |
sleep(1.0)
|
92 |
driver = helium.get_driver()
|
|
|
111 |
memory_step.observations = (
|
112 |
url_info if memory_step.observations is None else memory_step.observations + "\n" + url_info
|
113 |
)
|
114 |
+
return screenshot_path
|
|
|
115 |
|
116 |
# Initialize model and agent
|
117 |
model = LiteLLMModel("gemini/gemini-2.0-flash")
|