ariefrahmansyah commited on
Commit
b77ca10
1 Parent(s): 7eb7760

Add gradio hello world app; add github actions to sync to hub

Browse files
Files changed (2) hide show
  1. .github/workflows/hub.yml +19 -0
  2. app.py +9 -0
.github/workflows/hub.yml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face hub
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ with:
14
+ fetch-depth: 0
15
+ - name: Push to Hugging Face hub
16
+ env:
17
+ HF_USERNAME: ${{ secrets.HF_USERNAME }}
18
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
19
+ run: git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/patal-dev/april main
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+
4
+ def greet(name):
5
+ return "Hello " + name + "!!"
6
+
7
+
8
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
9
+ iface.launch()