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 |
-
from smolagents import CodeAgent, InferenceClientModel, DuckDuckGoSearchTool,Tool,tool,
|
| 7 |
|
| 8 |
|
| 9 |
# (Keep Constants as is)
|
|
@@ -113,7 +113,8 @@ class BasicAgent:
|
|
| 113 |
],
|
| 114 |
model= InferenceClientModel("Qwen/Qwen2.5-Coder-32B-Instruct") ,
|
| 115 |
#additional_authorized_imports=["pandas", "requests", "re"],
|
| 116 |
-
instructions = "If the question includes a task_id and mentions a file, call fetch_task_file first; route YouTube URLs to get_youtube_transcript, other URLs to visit_webpage, PDFs to pdf_tool, and spreadsheets to read_spreadsheet, using web_search only when no URL or file is given,then respond with only the exact final answer value, no explanation, no prefix."
|
|
|
|
| 117 |
max_steps=20,
|
| 118 |
)
|
| 119 |
#answering questions
|
|
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
+
from smolagents import CodeAgent, InferenceClientModel, DuckDuckGoSearchTool,Tool,tool,VisitWebpageTool,FinalAnswerTool
|
| 7 |
|
| 8 |
|
| 9 |
# (Keep Constants as is)
|
|
|
|
| 113 |
],
|
| 114 |
model= InferenceClientModel("Qwen/Qwen2.5-Coder-32B-Instruct") ,
|
| 115 |
#additional_authorized_imports=["pandas", "requests", "re"],
|
| 116 |
+
instructions = ("You are an advanced CodeAgent that will show your capabilities to work in the real world by being tested in GAIA, the agent testing platform. If the question includes a task_id and mentions a file, call fetch_task_file first; route YouTube URLs to get_youtube_transcript, other URLs to visit_webpage, PDFs to pdf_tool, and spreadsheets to read_spreadsheet, using web_search only when no URL or file is given,then respond with only the exact final answer value, no explanation, no prefix."
|
| 117 |
+
"Use the Thought Action observation to produce high quality results and only answer when you are sure you have performed the necessary steps for the task and question"),
|
| 118 |
max_steps=20,
|
| 119 |
)
|
| 120 |
#answering questions
|