Spaces:
Running
Running
File size: 377 Bytes
38e4cc9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import requests
import json
# Fetch available models from Hugging Face router
response = requests.get("https://router.huggingface.co/v1/models")
models = response.json()
print(f"Found {len(models['data'])} models:")
for model in models['data']:
print(f"- {model['id']}")
# Save to file for later use
with open('models.json', 'w') as f:
json.dump(models, f, indent=2) |