soutrik commited on
Commit
f0556d1
1 Parent(s): e7815b6

Add GitHub Actions workflow to deploy to Hugging Face Spaces

Browse files
Files changed (4) hide show
  1. .github/workflows/deploy-to-hf.yml +26 -0
  2. README.md +1 -0
  3. app.py +7 -0
  4. requirements.txt +2 -0
.github/workflows/deploy-to-hf.yml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy to Hugging Face Spaces
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main # or the branch you want to trigger the deployment from
7
+
8
+ jobs:
9
+ deploy:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout repository
13
+ uses: actions/checkout@v2
14
+
15
+ - name: Install Git Large File Storage (LFS)
16
+ run: |
17
+ curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
18
+ sudo apt-get install git-lfs
19
+ git lfs install
20
+
21
+ - name: Push to Hugging Face
22
+ env:
23
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
24
+ run: |
25
+ git remote add hf https://huggingface.co/spaces/soutrik/EraV2_S20_Tokenization
26
+ git push hf main
README.md CHANGED
@@ -1 +1,2 @@
1
  # EraV2_S20_Tokenization
 
 
1
  # EraV2_S20_Tokenization
2
+ - HF Token: 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
app.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def greet(name):
4
+ return "Hello " + name + "!!"
5
+
6
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ joblib
2
+ regex