Bump marker version to 1.10.1 #54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: HuggingFace Model Sync | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| - 'feature/hf-model-sync' | |
| paths: | |
| - marker | |
| - cache/** | |
| - .github/workflows/hf-model-sync.yml | |
| jobs: | |
| hf-model-sync: | |
| name: Sync models to HuggingFace | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Upgrade pip | |
| run: python -m pip install --upgrade pip | |
| - name: Install huggingface cli | |
| uses: BSFishy/pip-action@v1 | |
| with: | |
| packages: huggingface_hub[cli] | |
| extra: --user | |
| - name: Install poetry | |
| uses: abatilo/actions-poetry@v3 | |
| with: | |
| poetry-version: 'latest' | |
| - name: Install marker | |
| working-directory: ./marker | |
| run: poetry install | |
| - name: Get Poetry venv path | |
| id: poetry-env | |
| working-directory: ./marker | |
| run: echo "VENV=$(poetry env info -p)" >> $GITHUB_OUTPUT | |
| - name: Download models from s3 | |
| working-directory: ./cache | |
| run: ${{ steps.poetry-env.outputs.VENV }}/bin/python surya-s3-model-download.py | |
| - name: Log in to Hugging Face CLI | |
| run: huggingface-cli login --token ${{ secrets.HF_TOKEN }} | |
| - name: Upload models to Hugging Face | |
| env: | |
| DETECTOR_MODEL_REPO_ID: "${{ secrets.HF_USERNAME }}/surya_text_detection" | |
| RECOGNITION_MODEL_REPO_ID: "${{ secrets.HF_USERNAME }}/surya_text_recognition" | |
| LAYOUT_MODEL_REPO_ID: "${{ secrets.HF_USERNAME }}/surya_layout" | |
| TABLE_REC_MODEL_REPO_ID: "${{ secrets.HF_USERNAME }}/surya_table_recognition" | |
| OCR_ERROR_MODEL_REPO_ID: "${{ secrets.HF_USERNAME }}/surya_ocr_error_detection" | |
| working-directory: ./cache | |
| run: ${{ steps.poetry-env.outputs.VENV }}/bin/python hf-s3-model-upload.py | |
| - name: Log out from Hugging Face CLI | |
| if: always() | |
| run: huggingface-cli logout |