Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,11 +19,6 @@ from smolagents.agents import ActionStep
|
|
| 19 |
from tools.search_item_ctrl_f import SearchItemCtrlFTool
|
| 20 |
from tools.go_back import GoBackTool
|
| 21 |
from tools.close_popups import ClosePopupsTool
|
| 22 |
-
from tools.scroll_page import ScrollPageTool
|
| 23 |
-
from tools.scrape_text import ScrapeTextTool
|
| 24 |
-
from tools.interact_element import InteractElementTool
|
| 25 |
-
from tools.detect_elements import DetectElementsTool
|
| 26 |
-
from tools.final_answer import FinalAnswerTool
|
| 27 |
from GRADIO_UI import GradioUI
|
| 28 |
|
| 29 |
# Set up logging
|
|
@@ -101,11 +96,6 @@ tools = [
|
|
| 101 |
SearchItemCtrlFTool(driver=driver),
|
| 102 |
GoBackTool(driver=driver),
|
| 103 |
ClosePopupsTool(driver=driver),
|
| 104 |
-
ScrollPageTool(driver=driver),
|
| 105 |
-
ScrapeTextTool(driver=driver),
|
| 106 |
-
InteractElementTool(driver=driver),
|
| 107 |
-
DetectElementsTool(driver=driver),
|
| 108 |
-
FinalAnswerTool()
|
| 109 |
]
|
| 110 |
|
| 111 |
# Debug tool registration
|
|
@@ -143,23 +133,7 @@ def initialize_agent(gemini_api_key=None):
|
|
| 143 |
verbosity_level=2,
|
| 144 |
prompt_templates=prompt_templates,
|
| 145 |
step_callbacks=[save_screenshot],
|
| 146 |
-
additional_authorized_imports=[
|
| 147 |
-
"helium",
|
| 148 |
-
"unicodedata",
|
| 149 |
-
"stat",
|
| 150 |
-
"datetime",
|
| 151 |
-
"random",
|
| 152 |
-
"pandas",
|
| 153 |
-
"itertools",
|
| 154 |
-
"math",
|
| 155 |
-
"statistics",
|
| 156 |
-
"queue",
|
| 157 |
-
"time",
|
| 158 |
-
"collections",
|
| 159 |
-
"re",
|
| 160 |
-
"cv2",
|
| 161 |
-
"numpy"
|
| 162 |
-
]
|
| 163 |
)
|
| 164 |
agent.python_executor("from helium import *")
|
| 165 |
return agent
|
|
|
|
| 19 |
from tools.search_item_ctrl_f import SearchItemCtrlFTool
|
| 20 |
from tools.go_back import GoBackTool
|
| 21 |
from tools.close_popups import ClosePopupsTool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
from GRADIO_UI import GradioUI
|
| 23 |
|
| 24 |
# Set up logging
|
|
|
|
| 96 |
SearchItemCtrlFTool(driver=driver),
|
| 97 |
GoBackTool(driver=driver),
|
| 98 |
ClosePopupsTool(driver=driver),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
]
|
| 100 |
|
| 101 |
# Debug tool registration
|
|
|
|
| 133 |
verbosity_level=2,
|
| 134 |
prompt_templates=prompt_templates,
|
| 135 |
step_callbacks=[save_screenshot],
|
| 136 |
+
additional_authorized_imports=["helium"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
)
|
| 138 |
agent.python_executor("from helium import *")
|
| 139 |
return agent
|