Spaces:
Sleeping
Sleeping
add wiki and speech
Browse files- app.py +4 -2
- requirements.txt +4 -0
app.py
CHANGED
@@ -3,7 +3,8 @@ import gradio as gr
|
|
3 |
import requests
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
-
from smolagents import OpenAIServerModel, DuckDuckGoSearchTool, PythonInterpreterTool, CodeAgent
|
|
|
7 |
from pathlib import Path
|
8 |
import tempfile
|
9 |
|
@@ -52,8 +53,9 @@ class BasicAgent:
|
|
52 |
def __init__(self):
|
53 |
self.agent = CodeAgent(
|
54 |
model=OpenAIServerModel(model_id="gpt-4o"),
|
55 |
-
tools=[DuckDuckGoSearchTool()],
|
56 |
add_base_tools=True,
|
|
|
57 |
)
|
58 |
|
59 |
print("BasicAgent initialized.")
|
|
|
3 |
import requests
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
+
from smolagents import OpenAIServerModel, DuckDuckGoSearchTool, PythonInterpreterTool, CodeAgent, WikipediaSearchTool, \
|
7 |
+
SpeechToTextTool
|
8 |
from pathlib import Path
|
9 |
import tempfile
|
10 |
|
|
|
53 |
def __init__(self):
|
54 |
self.agent = CodeAgent(
|
55 |
model=OpenAIServerModel(model_id="gpt-4o"),
|
56 |
+
tools=[DuckDuckGoSearchTool(), WikipediaSearchTool(), SpeechToTextTool()],
|
57 |
add_base_tools=True,
|
58 |
+
additional_authorized_imports=['pandas','numpy','csv']
|
59 |
)
|
60 |
|
61 |
print("BasicAgent initialized.")
|
requirements.txt
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
gradio
|
2 |
requests
|
3 |
smolagents[openai]
|
|
|
4 |
smolagents
|
|
|
|
|
|
|
|
1 |
gradio
|
2 |
requests
|
3 |
smolagents[openai]
|
4 |
+
smolagents[audio]
|
5 |
smolagents
|
6 |
+
wikipedia-api
|
7 |
+
transformers
|
8 |
+
smolagents[transformers]
|