Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import pytz
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from bs4 import BeautifulSoup
|
| 8 |
-
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
@@ -64,8 +64,8 @@ def fetch_artist_networth(artist_name: str) -> str:
|
|
| 64 |
|
| 65 |
|
| 66 |
final_answer = FinalAnswerTool()
|
| 67 |
-
|
| 68 |
-
# If the agent does
|
| 69 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 70 |
|
| 71 |
model = HfApiModel(
|
|
@@ -84,7 +84,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 84 |
|
| 85 |
agent = CodeAgent(
|
| 86 |
model=model,
|
| 87 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 88 |
max_steps=6,
|
| 89 |
verbosity_level=1,
|
| 90 |
grammar=None,
|
|
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from bs4 import BeautifulSoup
|
| 8 |
+
from
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
|
|
| 64 |
|
| 65 |
|
| 66 |
final_answer = FinalAnswerTool()
|
| 67 |
+
search_tool = DuckDuckGoSearchTool()
|
| 68 |
+
# If the agent does search_tool = DuckDuckGoSearchTool() answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 69 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
| 70 |
|
| 71 |
model = HfApiModel(
|
|
|
|
| 84 |
|
| 85 |
agent = CodeAgent(
|
| 86 |
model=model,
|
| 87 |
+
tools=[final_answer,search_tool], ## add your tools here (don't remove final answer)
|
| 88 |
max_steps=6,
|
| 89 |
verbosity_level=1,
|
| 90 |
grammar=None,
|