sunchow's picture
Upload folder using huggingface_hub
6c3fd92 verified
raw
history blame contribute delete
945 Bytes
name: Tourism Project Pipeline
on:
push:
branches: [ main ]
jobs:
mlops-pipeline:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Dependencies
run: |
pip install pandas scikit-learn huggingface_hub joblib streamlit
- name: Sync to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
# Use Python to push files to your Space
python -c "
from huggingface_hub import HfApi
api = HfApi()
# Replace 'sunchow/tourism-app' with your actual Space ID
api.upload_folder(
folder_path='.',
repo_id='sunchow/tourism-app',
repo_type='space',
token='${{ secrets.HF_TOKEN }}'
)"