Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,19 +29,19 @@ CURRENT_PROMPT = """You are a helpful assistant that can use tools including web
|
|
29 |
Question: {question}
|
30 |
|
31 |
To answer this question:
|
32 |
-
1. If you need current information or facts you're unsure about, use the search tool
|
33 |
-
2.
|
34 |
-
3.
|
|
|
35 |
|
36 |
Available tools:
|
37 |
- web_search(query: str) β str
|
38 |
- visit_webpage(url: str) β str
|
39 |
-
-
|
40 |
- python(code: str) β Any
|
41 |
- final_answer(answer: str) β None
|
42 |
|
43 |
-
Please provide a complete solution that ends with the final answer.
|
44 |
-
Please confirm your final answer before using the final_answer tool."""
|
45 |
|
46 |
# --- Basic Agent Definition ---
|
47 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
@@ -105,13 +105,14 @@ class BasicAgent:
|
|
105 |
self.agent = CodeAgent(
|
106 |
tools=[],
|
107 |
model=self.model,
|
108 |
-
max_steps=
|
109 |
additional_authorized_imports=[
|
110 |
'math', 'statistics', 're', # Basic computation
|
111 |
'requests', 'json', # Web requests and JSON
|
112 |
'pandas', 'numpy', 'openpyxl',# Data analysis
|
113 |
'zipfile', 'os', # File processing
|
114 |
-
'datetime', 'time'
|
|
|
115 |
],
|
116 |
add_base_tools=True,
|
117 |
)
|
|
|
29 |
Question: {question}
|
30 |
|
31 |
To answer this question:
|
32 |
+
1. If you need current information or facts you're unsure about, use the search tool
|
33 |
+
2. If you need to transcribe audio, import Transcriber from smolagents and instantiate 'transcriber = Transcriber()'
|
34 |
+
3. Write Python code to solve the problem
|
35 |
+
4. Make sure your final answer is clear and direct
|
36 |
|
37 |
Available tools:
|
38 |
- web_search(query: str) β str
|
39 |
- visit_webpage(url: str) β str
|
40 |
+
- transcriber(audio_file_path: str) β str
|
41 |
- python(code: str) β Any
|
42 |
- final_answer(answer: str) β None
|
43 |
|
44 |
+
Please provide a complete solution that ends with the correct final answer."""
|
|
|
45 |
|
46 |
# --- Basic Agent Definition ---
|
47 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
|
|
105 |
self.agent = CodeAgent(
|
106 |
tools=[],
|
107 |
model=self.model,
|
108 |
+
max_steps=24,
|
109 |
additional_authorized_imports=[
|
110 |
'math', 'statistics', 're', # Basic computation
|
111 |
'requests', 'json', # Web requests and JSON
|
112 |
'pandas', 'numpy', 'openpyxl',# Data analysis
|
113 |
'zipfile', 'os', # File processing
|
114 |
+
'datetime', 'time', # Date/time operations
|
115 |
+
'smolagents'
|
116 |
],
|
117 |
add_base_tools=True,
|
118 |
)
|