Spaces:
No application file
No application file
Delete app.py
Browse files
app.py
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
import random
|
3 |
-
from smolagents import GradioUI, CodeAgent, HfApiModel
|
4 |
-
|
5 |
-
# Import our custom tools from their modules
|
6 |
-
from tools import DuckDuckGoSearchTool, CurrencyConverterTool
|
7 |
-
|
8 |
-
# Initialize the Hugging Face model
|
9 |
-
model = HfApiModel()
|
10 |
-
|
11 |
-
# Initialize the web search tool
|
12 |
-
search_tool = DuckDuckGoSearchTool()
|
13 |
-
|
14 |
-
# Initialize the weather tool
|
15 |
-
currency_converter_tool = CurrencyConverterTool()
|
16 |
-
|
17 |
-
# Create Alfred with all the tools
|
18 |
-
alfred = CodeAgent(
|
19 |
-
tools=[currency_converter_tool, search_tool],
|
20 |
-
model=model,
|
21 |
-
add_base_tools=True, # Add any additional base tools
|
22 |
-
planning_interval=3 # Enable planning every 3 steps
|
23 |
-
)
|
24 |
-
|
25 |
-
if __name__ == "__main__":
|
26 |
-
GradioUI(alfred).launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|