satpalsr commited on
Commit
367b2a4
1 Parent(s): 05e51c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -5
app.py CHANGED
@@ -21,9 +21,20 @@ def predict(input, history=[]):
21
 
22
  import gradio as gr
23
 
24
- gr.Interface(fn=predict,
25
- theme="default",
26
- css=".footer {display:none !important}",
27
- inputs=["text", "state"],
28
- outputs=["chatbot", "state"]).launch()
 
 
 
 
 
 
 
 
 
 
 
29
 
 
21
 
22
  import gradio as gr
23
 
24
+ demo = gr.Blocks()
25
+
26
+ with demo:
27
+ with gr.Row():
28
+ output_chatbot = gr.outputs.Chatbot()
29
+ output_state = gr.outputs.State()
30
+
31
+ with gr.Row():
32
+ input_text = gr.inputs.Textbox(label="write some text")
33
+ input_state = gr.inputs.State()
34
+
35
+ submit_button = gr.Button("Send")
36
+
37
+ submit_button.click(predict, inputs=[input_text, input_state], outputs=[output_chatbot, output_state])
38
+
39
+ demo.launch()
40