Spaces:
Running
Running
Update agent.py
Browse files
agent.py
CHANGED
@@ -179,7 +179,8 @@ class SpeechToTextTool(Tool):
|
|
179 |
def forward(self, audio_path: str) -> str:
|
180 |
if not os.path.exists(audio_path):
|
181 |
return f"Error: File not found at {audio_path}"
|
182 |
-
result = self.model.
|
|
|
183 |
return result.get("text", "")
|
184 |
|
185 |
class ExcelReaderTool(Tool):
|
@@ -286,10 +287,10 @@ class MagAgent:
|
|
286 |
DownloadTaskAttachmentTool(rate_limiter=rate_limiter),
|
287 |
# DuckDuckGoSearchTool(),
|
288 |
WikipediaSearchTool(),
|
289 |
-
SpeechToTextTool,
|
290 |
-
ExcelReaderTool,
|
291 |
-
VisitWebpageTool,
|
292 |
-
PythonCodeReaderTool,
|
293 |
GoogleSearchTool,
|
294 |
# ImageAnalysisTool,
|
295 |
],
|
|
|
179 |
def forward(self, audio_path: str) -> str:
|
180 |
if not os.path.exists(audio_path):
|
181 |
return f"Error: File not found at {audio_path}"
|
182 |
+
result = self.model.
|
183 |
+
transcribe(audio_path)
|
184 |
return result.get("text", "")
|
185 |
|
186 |
class ExcelReaderTool(Tool):
|
|
|
287 |
DownloadTaskAttachmentTool(rate_limiter=rate_limiter),
|
288 |
# DuckDuckGoSearchTool(),
|
289 |
WikipediaSearchTool(),
|
290 |
+
SpeechToTextTool(),
|
291 |
+
ExcelReaderTool(),
|
292 |
+
VisitWebpageTool(),
|
293 |
+
PythonCodeReaderTool(),
|
294 |
GoogleSearchTool,
|
295 |
# ImageAnalysisTool,
|
296 |
],
|