HALU-HAL commited on
Commit
a41dd32
·
1 Parent(s): 96817f6

update app

Browse files
Files changed (2) hide show
  1. .github/workflows/run.yaml +12 -29
  2. app.py +7 -0
.github/workflows/run.yaml CHANGED
@@ -1,37 +1,20 @@
1
- name: Deploy to huggingface
2
-
3
  on:
4
  push:
5
  branches: [main]
6
 
 
 
 
7
  jobs:
8
- deploy:
9
  runs-on: ubuntu-latest
10
  steps:
11
- - uses: backendcloud/hugging-push@v0.2.3
12
  with:
13
- # The Hugging Face repo id you want to sync to.
14
- # A repo with this name will be created if it doesn't exist. Required.
15
- # The github username is not included. ex: not like this 'username/reponame', but like this: 'reponame'
16
- # the key of huggingface_repo can be omitted. If the key is commented out, it defaults to the same name as the Github repository.
17
- # huggingface_repo: 'ChatGPT'
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()