pkiage commited on
Commit
f3a9a4d
β€’
1 Parent(s): 08225cd

Hugging Face config & sync

Browse files
.github/workflows/check_file_size.yml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Check file size
2
+ on: # or directly `on: [push]` to run the action on every push on any branch
3
+ pull_request:
4
+ branches: [main]
5
+
6
+ # to run this workflow manually from the Actions tab
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ sync-to-hub:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Check large files
14
+ uses: ActionsDesk/lfs-warning@v2.0
15
+ with:
16
+ filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
.github/workflows/sync_to_hf_hub.yml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face hub
2
+ on:
3
+ push:
4
+ branches: [main]
5
+
6
+ # to run this workflow manually from the Actions tab
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ sync-to-hub:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ with:
15
+ fetch-depth: 0
16
+ lfs: true
17
+ - name: Push to hub
18
+ env:
19
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
+ run: git push https://pkiage:$HF_TOKEN@huggingface.co/spaces/pkiage/time_series_decomposition_demo main
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Tool Time Series Decomposition
3
  emoji: πŸ“ˆ
4
  colorFrom: indigo
5
  colorTo: blue
@@ -85,6 +85,21 @@ python setup.py install
85
  streamlit run src/app.py
86
  ```
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
 
89
 
90
- <p><small>Project structure based on the <a target="_blank" href="https://drivendata.github.io/cookiecutter-data-science/">cookiecutter data science project template</a>.</small></p>
 
1
  ---
2
+ title: Time Series Decomposition
3
  emoji: πŸ“ˆ
4
  colorFrom: indigo
5
  colorTo: blue
 
85
  streamlit run src/app.py
86
  ```
87
 
88
+ ## Hugging Face Tips
89
+
90
+ Initial Setup
91
+ - [When creating the Spaces Configuration Reference](https://huggingface.co/docs/hub/spaces-config-reference) ensure the [Streamlit Space](https://huggingface.co/docs/hub/spaces-sdks-streamlit) version (sdk_version) specified is supported by HF
92
+
93
+ ```shell
94
+ git remote add space https://huggingface.co/spaces/pkiage/time_series_autocorrelation_demo
95
+
96
+ git push --force space main
97
+ ```
98
+ - [When syncing with Hugging Face via Github Actions](https://huggingface.co/docs/hub/spaces-github-actions) the [User Access Token](https://huggingface.co/docs/hub/security-tokens) created on Hugging Face (HF) should have write access
99
+
100
+
101
+ ## Demo Links
102
+ - Hugging Face Space: https://huggingface.co/spaces/pkiage/time_series_decomposition_demo
103
+ - Streamlit Community Cloud: https://pkiage-tool-time-series-autocorrelation-demo-app-l0umps.streamlit.app/
104
 
105
 
 
requirements.txt CHANGED
@@ -1,9 +1,5 @@
1
- # local package
2
- -e .
3
-
4
- # external requirements
5
- streamlit==1.9.2
6
- pandas==1.4.2
7
- statsmodels==0.13.2
8
- plotly==5.8.0
9
- matplotlib==3.5.2
 
1
+ streamlit
2
+ pandas
3
+ statsmodels
4
+ plotly
5
+ matplotlib