Download app/models/fetch.py from DilipKY/appstore: direct link, hf CLI and curl.
- Browser
- Download file 218 Bytes
-
https://huggingface.co/spaces/DilipKY/appstore/resolve/main/app/models/fetch.py
- Command line
-
hf download hf://spaces/DilipKY/appstore/app/models/fetch.py
-
curl -L -o fetch.py https://huggingface.co/spaces/DilipKY/appstore/resolve/main/app/models/fetch.py
218 Bytes
| from huggingface_hub import HfApi | |
| from huggingface_hub import ModelFilter | |
| def fetch_models(search_query=None): | |
| api = HfApi() | |
| models = api.list_models(filter=ModelFilter(search=search_query)) | |
| return models |