0num4 commited on
Commit
ea87ea7
1 Parent(s): 712a732

feat: update

Browse files
Files changed (2) hide show
  1. .github/workflows/connect-to-hf.yml +25 -0
  2. app.py +9 -6
.github/workflows/connect-to-hf.yml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: connecting-to-hf
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ pull_request:
7
+ branches:
8
+ - main
9
+
10
+ env:
11
+ HF_USERNAME: levena
12
+ HF_SPACE: zerogpudevmode
13
+
14
+ jobs:
15
+ sync:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+ lfs: true
23
+ - name: Sync to Hugging Face
24
+ run: git push --force https://levena:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/${{env.HF_USERNAME}}/${{env.HF_SPACE}} main
25
+ # run: git push https://ruslanmv:[email protected]/spaces/ruslanmv/Milvus-Client-Embedding main
app.py CHANGED
@@ -1,13 +1,16 @@
1
- import gradio as gr # type: ignore
 
2
 
3
  def greet(name, sliderint):
4
- return "Hello " + name + "!!" + str(sliderint)
 
5
 
6
- def chatinterface_fn(message,history):
7
  return f"{message} return"
8
 
 
9
  with gr.Blocks() as demo:
10
  name = gr.Textbox(label="name")
11
- output= gr.Interface(fn=greet, inputs=["text","slider"], outputs="text")
12
- a= gr.ChatInterface(chatinterface_fn).launch()
13
- demo.launch()
 
1
+ import gradio as gr # type: ignore
2
+
3
 
4
  def greet(name, sliderint):
5
+ return "Hellonyaaaaa " + name + "!!" + str(sliderint)
6
+
7
 
8
+ def chatinterface_fn(message, history):
9
  return f"{message} return"
10
 
11
+
12
  with gr.Blocks() as demo:
13
  name = gr.Textbox(label="name")
14
+ output = gr.Interface(fn=greet, inputs=["text", "slider"], outputs="text")
15
+ a = gr.ChatInterface(chatinterface_fn).launch()
16
+ demo.launch()