Elouarn commited on
Commit
5b84809
·
verified ·
1 Parent(s): 96661d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -245,9 +245,6 @@ mychatbot = gr.Chatbot(
245
  )
246
 
247
 
248
- with gr.Blocks():
249
- accuse_btn=gr.Button("Accuser")
250
-
251
  def chatbot_interface(request: gr.Request):
252
  chatbot_interface = gr.ChatInterface(
253
  fn=generate,
@@ -256,7 +253,6 @@ def chatbot_interface(request: gr.Request):
256
  retry_btn=None,
257
  undo_btn=None,
258
  clear_btn=None,
259
- additional_inputs=[accuse_btn],
260
  submit_btn="Parler",
261
  css="footer {visibility: hidden !important} .gradio-container {background-color: #2D4059 !important; color: #FFD460 !important;}",
262
  js=js_func
@@ -265,9 +261,11 @@ def chatbot_interface(request: gr.Request):
265
 
266
 
267
  def main(request: gr.Request):
268
- user_chatbot_interface = chatbot_interface(request)
269
- user_chatbot_interface.queue().launch(show_api=False,inline=True)
 
270
 
 
271
 
272
  if __name__ == "__main__":
273
  main(None)
 
245
  )
246
 
247
 
 
 
 
248
  def chatbot_interface(request: gr.Request):
249
  chatbot_interface = gr.ChatInterface(
250
  fn=generate,
 
253
  retry_btn=None,
254
  undo_btn=None,
255
  clear_btn=None,
 
256
  submit_btn="Parler",
257
  css="footer {visibility: hidden !important} .gradio-container {background-color: #2D4059 !important; color: #FFD460 !important;}",
258
  js=js_func
 
261
 
262
 
263
  def main(request: gr.Request):
264
+ with gr.Blocks() as demo:
265
+ chat_interface = chatbot_interface(request)
266
+ accuse_btn = gr.Button("Accuser")
267
 
268
+ demo.launch(show_api=False, inline=True)
269
 
270
  if __name__ == "__main__":
271
  main(None)