Spaces:
Runtime error
Runtime error
Commit
·
501c4dc
1
Parent(s):
c349766
Updated Alfred
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import random
|
3 |
-
from smolagents import CodeAgent, HfApiModel
|
4 |
|
5 |
# Import our custom tools from their modules
|
6 |
from tools import DuckDuckGoSearchTool, WeatherInfoTool, HubStatsTool
|
@@ -29,8 +29,5 @@ alfred = CodeAgent(
|
|
29 |
planning_interval=3 # Enable planning every 3 steps
|
30 |
)
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
36 |
-
demo.launch()
|
|
|
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, WeatherInfoTool, HubStatsTool
|
|
|
29 |
planning_interval=3 # Enable planning every 3 steps
|
30 |
)
|
31 |
|
32 |
+
if __name__ == "__main__":
|
33 |
+
GradioUI(agent).launch()
|
|
|
|
|
|