Akjava commited on
Commit
76c7f05
·
verified ·
1 Parent(s): e9e6104

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -90,10 +90,14 @@ function(chatbot){
90
  console.log(chatbot)
91
  }
92
  """
93
- chatbot = gr.Chatbot()
94
- demo = gr.ChatInterface(call_generate_text,chatbot=chatbot,type="messages")
95
- with demo as chat
96
  chatbot.change(None,[chatbot],[],js=js)
 
 
 
 
 
97
 
98
  if __name__ == "__main__":
99
  init()
 
90
  console.log(chatbot)
91
  }
92
  """
93
+ with gr.Blocks() as demo:
94
+ chatbot = gr.Chatbot()
 
95
  chatbot.change(None,[chatbot],[],js=js)
96
+ msg = gr.Textbox()
97
+ clear = gr.ClearButton([msg, chatbot])
98
+
99
+ #demo = gr.ChatInterface(call_generate_text,chatbot=chatbot,type="messages")
100
+ msg.submit(respond, [msg, chatbot], [msg, chatbot])
101
 
102
  if __name__ == "__main__":
103
  init()