Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import gradio as gr
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
-
|
| 7 |
from tools import hub_stats_tool
|
| 8 |
|
| 9 |
# (Keep Constants as is)
|
|
@@ -27,7 +27,7 @@ class NewAgent:
|
|
| 27 |
|
| 28 |
|
| 29 |
# Initialize the web search tool
|
| 30 |
-
|
| 31 |
# Initialize the Hub stats tool
|
| 32 |
hub_stats_tool = HubStatsTool()
|
| 33 |
# Generate the chat interface, including the tools
|
|
@@ -37,7 +37,7 @@ class NewAgent:
|
|
| 37 |
)
|
| 38 |
chat = ChatHuggingFace(llm=llm, verbose=True)
|
| 39 |
tools = [
|
| 40 |
-
|
| 41 |
# weather_info_tool,
|
| 42 |
hub_stats_tool,
|
| 43 |
]
|
|
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
+
from smolagents import DuckDuckGoSearchTool
|
| 7 |
from tools import hub_stats_tool
|
| 8 |
|
| 9 |
# (Keep Constants as is)
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
# Initialize the web search tool
|
| 30 |
+
search_tool = DuckDuckGoSearchTool()
|
| 31 |
# Initialize the Hub stats tool
|
| 32 |
hub_stats_tool = HubStatsTool()
|
| 33 |
# Generate the chat interface, including the tools
|
|
|
|
| 37 |
)
|
| 38 |
chat = ChatHuggingFace(llm=llm, verbose=True)
|
| 39 |
tools = [
|
| 40 |
+
search_tool,
|
| 41 |
# weather_info_tool,
|
| 42 |
hub_stats_tool,
|
| 43 |
]
|