LPX55 commited on
Commit
8f1ab22
·
1 Parent(s): 21617ff
Files changed (3) hide show
  1. README.md +1 -0
  2. app.py +11 -2
  3. requirements.txt +5 -0
README.md CHANGED
@@ -7,6 +7,7 @@ sdk: gradio
7
  sdk_version: 5.31.0
8
  app_file: app.py
9
  pinned: false
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
7
  sdk_version: 5.31.0
8
  app_file: app.py
9
  pinned: false
10
+ app_port: 8080
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -3,5 +3,14 @@ import gradio as gr
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- demo.launch()
 
 
 
 
 
 
 
 
 
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
+ with gr.Blocks() as demo:
7
+ with gr.Row():
8
+ with gr.Column():
9
+ input_text = gr.Textbox(label="Input")
10
+ submit_btn = gr.Button()
11
+ with gr.Column():
12
+ output_text = gr.Textbox(label="Output")
13
+
14
+ submit_btn.click(fn=greet, inputs=[input_text], outputs=[output_text])
15
+
16
+ demo.launch(share=True, server_port=8080)
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ gradio
2
+ pydantic==2.10.6
3
+ huggingface_hub
4
+ spaces
5
+ pyload-ng[all]