Satyanjay's picture
Upload folder using huggingface_hub
a5b4afd verified
raw
history blame contribute delete
775 Bytes
name: Deploy to Hugging Face
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install dependencies
run: pip install huggingface_hub
- name: Push to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }} # ๐Ÿ‘ˆ HERE
run: |
python <<EOF
from huggingface_hub import login, upload_folder
import os
# Login using token
login(token=os.environ["HF_TOKEN"])
# Upload entire repo to HF Space
upload_folder(
folder_path=".",
repo_id="Satyanjay/Investment-Agent",
repo_type="space"
)
EOF