zmeeks commited on
Commit
8b4bcba
Β·
verified Β·
1 Parent(s): 75abe69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
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 or another available tool first
33
- 2. Write Python code to solve the problem
34
- 3. Make sure your final answer is clear and direct
 
35
 
36
  Available tools:
37
  - web_search(query: str) β†’ str
38
  - visit_webpage(url: str) β†’ str
39
- - speech_to_text(file_path: str) β†’ str
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=12,
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
  ],
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
  )