Spaces:
Sleeping
Sleeping
update app
Browse files- .github/workflows/run.yaml +12 -29
- app.py +7 -0
.github/workflows/run.yaml
CHANGED
@@ -1,37 +1,20 @@
|
|
1 |
-
name:
|
2 |
-
|
3 |
on:
|
4 |
push:
|
5 |
branches: [main]
|
6 |
|
|
|
|
|
|
|
7 |
jobs:
|
8 |
-
|
9 |
runs-on: ubuntu-latest
|
10 |
steps:
|
11 |
-
- uses:
|
12 |
with:
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
# Hugging Face token with write access. Required.
|
20 |
-
# Here, we provide a token that we called `HF_TOKEN` when we added the secret to our GitHub repo.
|
21 |
-
hf_token: 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
|
22 |
-
|
23 |
-
# The type of repo you are syncing to: model, dataset, or space.
|
24 |
-
# Defaults to space.
|
25 |
-
repo_type: 'space'
|
26 |
-
|
27 |
-
# If true and the Hugging Face repo doesn't already exist, it will be created
|
28 |
-
# as a private repo.
|
29 |
-
#
|
30 |
-
# Note: this param has no effect if the repo already exists.
|
31 |
-
private: false
|
32 |
-
|
33 |
-
# If repo type is space, specify a space_sdk. One of: streamlit, gradio, or static
|
34 |
-
#
|
35 |
-
# This option is especially important if the repo has not been created yet.
|
36 |
-
# It won't really be used if the repo already exists.
|
37 |
-
space_sdk: 'gradio'
|
|
|
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://MakiAi:[email protected]/spaces/MakiAi/Github-Actions-DEMO main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.py
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(name):
|
4 |
+
return "Hello " + name + "!!"
|
5 |
+
|
6 |
+
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
+
iface.launch()
|