Skip to content

Commit

Permalink
Automatically sync demo to Hugging Face Spaces (#78)
Browse files Browse the repository at this point in the history
* Add sync_hf_space.yaml

* Update clone to use token

* minor update to app

* Add git add and commit

* Add configure git

* Configure git inside hf-space
  • Loading branch information
daavoo authored Jan 9, 2025
1 parent 87569b4 commit 6cb80f4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/sync_hf_space.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,21 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- run: git clone https://${{ secrets.HF_USERNAME }}:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/mozilla-ai/document-to-podcast hf-space

- run: |
cp demo/app.py hf-space/app.py
cp demo/requirements.txt hf-space/requirements.txt
- run: |
cd hf-space
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Sync with https://github.com/mozilla-ai/document-to-podcast"
- name: Push to Hugging Face
run: |
cd hf-space
git push https://${{ secrets.HF_USERNAME }}:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/mozilla-ai/document-to-podcast main
2 changes: 1 addition & 1 deletion demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def process_url_content(url: str) -> tuple[str, str]:
st.markdown(
"For this demo, we are using the following models: \n"
"- [OLMoE-1B-7B-0924-Instruct](https://huggingface.co/allenai/OLMoE-1B-7B-0924-Instruct-GGUF)\n"
"- [OuteAI/OuteTTS-0.2-500M-GGUF/OuteTTS-0.2-500M-FP16.gguf](https://huggingface.co/OuteAI/OuteTTS-0.2-500M-GGUF)"
"- [OuteAI/OuteTTS-0.2-500M](https://huggingface.co/OuteAI/OuteTTS-0.2-500M-GGUF)"
)
st.markdown(
"You can check the [Customization Guide](https://mozilla-ai.github.io/document-to-podcast/customization/)"
Expand Down
1 change: 1 addition & 0 deletions demo/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document-to-podcast

0 comments on commit 6cb80f4

Please sign in to comment.