Embed Research Papers #16
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: Embed Research Papers | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'papers/**/*.pdf' | |
| workflow_dispatch: | |
| jobs: | |
| embed: | |
| runs-on: ubuntu-latest | |
| env: | |
| SUPABASE_URI: ${{ secrets.SUPABASE_URI }} | |
| SUPABASE_SERVICE_KEY: ${{ secrets.SUPABASE_SERVICE_KEY }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y poppler-utils libgl1 tesseract-ocr build-essential python3-dev | |
| python -m pip install --upgrade pip | |
| pip install -r api/vector_requirements.txt | |
| python -m spacy download en_core_web_sm | |
| - name: Run embedding script | |
| run: python api/vector_search.py |