Update create_ner_model.py #7
This file contains 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: Train spaCy NER model | |
on: | |
push: | |
branches: | |
- machine-learn | |
jobs: | |
train-ner-model: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python environment | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
pip install spacy pandas | |
- name: Set working directory | |
run: cd machine-learn/ # Replace 'path/to/directory' with the path to your working directory | |
working-directory: ${{ github.workspace }} # Use the GitHub workspace as the starting directory | |
- name: Run training script | |
run: | | |
python machine-learn/create_ner_model.py | |
- name: Commit and push changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add custom_ner_model | |
git commit -m "Update custom_ner_model" || echo "No changes to commit" | |
git push |