patti-j commited on
Commit
073e6cc
1 Parent(s): 91adf1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -28,7 +28,7 @@ def respond(message, chat_history):
28
  # history.append((inp, output))
29
  # return history
30
 
31
- with gr.Blocks(theme=gr.themes.Soft()):
32
 
33
  chatbot = gr.Chatbot()
34
 
@@ -44,7 +44,7 @@ with gr.Blocks(theme=gr.themes.Soft()):
44
  label="What would you like to talk about?",
45
  type = "text",
46
  )
47
- message.submit(respond, [message, chatbot], [msg, chatbot])
48
 
49
  with gr.Row():
50
  submit = gr.Button(value="Send", variant="secondary").style(full_width=False)
@@ -59,5 +59,5 @@ with gr.Blocks(theme=gr.themes.Soft()):
59
  inputs=message,
60
  )
61
 
62
-
63
- block.launch(debug=True)
 
28
  # history.append((inp, output))
29
  # return history
30
 
31
+ with gr.Blocks(theme=gr.themes.Soft()) as demo:
32
 
33
  chatbot = gr.Chatbot()
34
 
 
44
  label="What would you like to talk about?",
45
  type = "text",
46
  )
47
+ message.submit(respond, [message, chatbot], [response, chatbot])
48
 
49
  with gr.Row():
50
  submit = gr.Button(value="Send", variant="secondary").style(full_width=False)
 
59
  inputs=message,
60
  )
61
 
62
+ if __name__ == "__main__":
63
+ demo.launch(debug=True)