Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,15 @@
|
|
1 |
from smolagents import CodeAgent
|
2 |
-
|
3 |
#from smolagents import DuckDuckGoSearchTool
|
4 |
-
import huggingface_hub
|
5 |
import os
|
6 |
|
7 |
-
|
8 |
-
)
|
9 |
-
agent = CodeAgent(tools=[
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")
|
|
|
1 |
from smolagents import CodeAgent
|
2 |
+
from smolagents import HfApiModel
|
3 |
#from smolagents import DuckDuckGoSearchTool
|
|
|
4 |
import os
|
5 |
|
6 |
+
#Agent Example
|
7 |
+
model = HfApiModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct", token=os.getenv('Testing'))
|
8 |
+
agent = CodeAgent(tools=[], model=model)
|
9 |
+
agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")
|
10 |
+
|
11 |
+
# Access HF Hub
|
12 |
+
import huggingface_hub
|
13 |
+
all_Hf_models_stats = huggingface_hub.HfApi().list_models()
|
14 |
+
print(all_Hf_models_stats)
|
15 |
|
|