rahulnamdev commited on
Commit
58b19e1
·
verified ·
1 Parent(s): c31e5ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -1,11 +1,15 @@
1
  from smolagents import CodeAgent
2
- #from smolagents import HfApiModel
3
  #from smolagents import DuckDuckGoSearchTool
4
- import huggingface_hub
5
  import os
6
 
7
- model = huggingface_hub.HfApiModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct", token=os.getenv('Testing')
8
- )
9
- agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model)
 
 
 
 
 
 
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