Spaces:
Runtime error
Runtime error
| 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 | |
| import huggingface_hub | |
| all_Hf_models_stats = huggingface_hub.HfApi().list_models() | |
| list(all_Hf_models_stats(sort="downloads", direction=-1, limit=5)) | |