Spaces:
Sleeping
Sleeping
POC query
Browse files
app.py
CHANGED
|
@@ -5,8 +5,9 @@ import yaml
|
|
| 5 |
|
| 6 |
# ==== Import des tools définis dans tools/ ====
|
| 7 |
from tools.final_answer import FinalAnswerTool
|
| 8 |
-
from tools.web_search import DuckDuckGoSearchTool
|
| 9 |
from tools.visit_webpage import VisitWebpageTool
|
|
|
|
| 10 |
|
| 11 |
from Gradio_UI import GradioUI
|
| 12 |
|
|
@@ -41,8 +42,9 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 41 |
# ==== Instanciation des tools existants ====
|
| 42 |
|
| 43 |
final_answer = FinalAnswerTool()
|
| 44 |
-
web_search = DuckDuckGoSearchTool()
|
| 45 |
visit_webpage = VisitWebpageTool()
|
|
|
|
| 46 |
|
| 47 |
# Tool Hub text->image (prévu dans le cours)
|
| 48 |
image_generation_tool = load_tool(
|
|
@@ -69,7 +71,8 @@ with open("prompts.yaml", "r") as stream:
|
|
| 69 |
agent = CodeAgent(
|
| 70 |
model=model,
|
| 71 |
tools=[
|
| 72 |
-
web_search, # DuckDuckGo web search
|
|
|
|
| 73 |
visit_webpage, # lecture de page web
|
| 74 |
image_generation_tool, # génération d’image
|
| 75 |
my_custom_tool, # tool custom
|
|
|
|
| 5 |
|
| 6 |
# ==== Import des tools définis dans tools/ ====
|
| 7 |
from tools.final_answer import FinalAnswerTool
|
| 8 |
+
#from tools.web_search import DuckDuckGoSearchTool
|
| 9 |
from tools.visit_webpage import VisitWebpageTool
|
| 10 |
+
from tools.http_search import HttpSearchTool
|
| 11 |
|
| 12 |
from Gradio_UI import GradioUI
|
| 13 |
|
|
|
|
| 42 |
# ==== Instanciation des tools existants ====
|
| 43 |
|
| 44 |
final_answer = FinalAnswerTool()
|
| 45 |
+
#web_search = DuckDuckGoSearchTool()
|
| 46 |
visit_webpage = VisitWebpageTool()
|
| 47 |
+
http_search = HttpSearchTool(language="en")
|
| 48 |
|
| 49 |
# Tool Hub text->image (prévu dans le cours)
|
| 50 |
image_generation_tool = load_tool(
|
|
|
|
| 71 |
agent = CodeAgent(
|
| 72 |
model=model,
|
| 73 |
tools=[
|
| 74 |
+
#web_search, # DuckDuckGo web search
|
| 75 |
+
http_search,
|
| 76 |
visit_webpage, # lecture de page web
|
| 77 |
image_generation_tool, # génération d’image
|
| 78 |
my_custom_tool, # tool custom
|