NagarajanB1990 commited on
Commit
53e5ed5
·
verified ·
1 Parent(s): bd23629

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -1,12 +1,13 @@
1
- import smolagents
2
- print("Smolagents version:", smolagents.__version__)
3
  import gradio as gr
4
- from smolagents import CodeAgent, PythonCodeInterpreter, HfApiModel
 
5
 
6
  # Build agent
7
  agent = CodeAgent(
8
- tools=[CodeInterpreterTool()],
9
- model=HfApiModel(model="HuggingFaceH4/zephyr-7b-alpha")
10
  )
11
 
12
  # Function
 
1
+ # app.py
2
+
3
  import gradio as gr
4
+ from smolagents import CodeAgent, HfApiModel
5
+ from smolagents.tools import PythonCodeInterpreter
6
 
7
  # Build agent
8
  agent = CodeAgent(
9
+ tools=[PythonCodeInterpreter()],
10
+ model=HfApiModel(model="HuggingFaceH4/zephyr-7b-alpha") # works on free CPU Space
11
  )
12
 
13
  # Function