File size: 570 Bytes
c31e5ec
58b19e1
c31e5ec
6df506c
d3dd41c
58b19e1
ac91d16
 
 
58b19e1
 
9e97df9
 
 
 
52fda4a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from smolagents import CodeAgent  
from smolagents import HfApiModel
#from smolagents import DuckDuckGoSearchTool
import os

#Agent Example 
#model = HfApiModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct", token=os.getenv('Testing'))
#agent = CodeAgent(tools=[], model=model)
#agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")

# Access HF Hub 
from huggingface_hub import list_models

for model in list_models(limit=10, sort="downloads", direction=-1, filter="object-detection"):
    print(model.id, model.downloads)