dammy commited on
Commit
dbc876d
·
1 Parent(s): 2c74bb5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -5,14 +5,15 @@ def generate_text(text):
5
 
6
  return 'success'
7
 
8
- # Define the Gradio interface.
9
- chat_box = gr.Textbox(label="Chat Box")
10
- chat_button = gr.Button("Send")
11
- chat_response = gr.Textbox(label="Chat Response")
 
12
 
13
 
14
- chat_button.click(generate_text, chat_box, chat_response)
15
 
16
 
17
- interface = gr.Interface([chat_box, chat_button], [chat_response])
18
- interface.launch()
 
5
 
6
  return 'success'
7
 
8
+ with gr.Blocks() as demo:
9
+
10
+ input_box = gr.Textbox(label="Enter your input")
11
+ input_button = gr.Button("Submit")
12
+ input_output = gr.Textbox(label="Result")
13
 
14
 
15
+ input_button.click(generate_text, input_box, input_output)
16
 
17
 
18
+ gr.close_all()
19
+ demo.queue().launch()