Spaces:
Sleeping
Sleeping
test
Browse files
app.py
CHANGED
|
@@ -1,22 +1,17 @@
|
|
| 1 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
|
|
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
|
|
|
| 7 |
# from tools.web_search import
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
# def web_search_by_text(search_query:str)-> str: #it's import to specify the return type
|
| 14 |
-
# """A tool that does nothing yet
|
| 15 |
-
# Args:
|
| 16 |
-
# arg1: the first argument
|
| 17 |
-
# arg2: the second argument
|
| 18 |
-
# """
|
| 19 |
-
# return "NONE"
|
| 20 |
|
| 21 |
@tool
|
| 22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
@@ -64,11 +59,6 @@ agent = CodeAgent(
|
|
| 64 |
name=None,
|
| 65 |
description=None,
|
| 66 |
prompt_templates=prompt_templates,
|
| 67 |
-
additional_authorized_imports=[
|
| 68 |
-
"selenium",
|
| 69 |
-
"selenium.webdriver.common.by",
|
| 70 |
-
"selenium.webdriver.common.keys"
|
| 71 |
-
]
|
| 72 |
)
|
| 73 |
|
| 74 |
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel,load_tool, tool
|
| 2 |
+
from smolagents.smolagents import vision_web_browser
|
| 3 |
import datetime
|
| 4 |
import requests
|
| 5 |
import pytz
|
| 6 |
import yaml
|
| 7 |
from tools.final_answer import FinalAnswerTool
|
| 8 |
+
from tools.vision_web_browser import
|
| 9 |
# from tools.web_search import
|
| 10 |
|
| 11 |
from Gradio_UI import GradioUI
|
| 12 |
|
| 13 |
+
|
| 14 |
+
print(vision_web_browser)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
@tool
|
| 17 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 59 |
name=None,
|
| 60 |
description=None,
|
| 61 |
prompt_templates=prompt_templates,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
)
|
| 63 |
|
| 64 |
|