├── .github └── workflows │ └── scrape.yml ├── README.md ├── TheBloke.json └── requirements.txt /.github/workflows/scrape.yml: -------------------------------------------------------------------------------- 1 | name: Scrape Hugging Face models 2 | 3 | on: 4 | push: 5 | workflow_dispatch: 6 | schedule: 7 | - cron: '33 * * * *' 8 | 9 | permissions: 10 | contents: write 11 | 12 | jobs: 13 | fetch: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v3 17 | with: 18 | fetch-depth: 0 19 | - uses: actions/setup-python@v4 20 | with: 21 | python-version: '3.11' 22 | cache: pip 23 | - name: Install requirements 24 | run: pip install -r requirements.txt 25 | - name: Scrape 26 | run: | 27 | curl --request GET \ 28 | --url 'https://huggingface.co/api/models?author=TheBloke' \ 29 | | jq > TheBloke.json 30 | - name: Commit and push 31 | run: |- 32 | git config user.name "Automated" 33 | git config user.email "actions@users.noreply.github.com" 34 | git add -A 35 | timestamp=$(date -u) 36 | git commit -m "${timestamp}" || exit 0 37 | git pull --rebase 38 | git push 39 | - name: Generate history 40 | run: | 41 | git-history file history.db TheBloke.json --id id 42 | - name: Upload as artifact 43 | uses: actions/upload-artifact@v3 44 | with: 45 | name: history 46 | path: history.db 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # scrape-huggingface-models 2 | 3 | This repository mainly exists to make it easy to [browse models by TheBloke using Datasette Lite](https://lite.datasette.io/?json=https://github.com/simonw/scrape-huggingface-models/blob/main/TheBloke.json#/data/TheBloke?_filter_column=id&_filter_op=contains&_filter_value=%2F&_sort=downloads&_sort_by_desc=on&_facet_array=tags). 4 | 5 | **Archived April 21st 2024**. 6 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | git-history 2 | --------------------------------------------------------------------------------