bhaskartripathi commited on
Commit
e8beffc
·
verified ·
1 Parent(s): ffe0f3c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -269,6 +269,7 @@ with gr.Blocks(css="""#chatbot { font-size: 14px; min-height: 1200; }""") as dem
269
  # Chat Interface
270
  chatbot = gr.Chatbot(label="Chat History", type="messages")
271
  msg = gr.Textbox(label="Enter your question here", lines=2)
 
272
  clear = gr.ClearButton([msg, chatbot])
273
 
274
  # Example Questions
@@ -315,10 +316,16 @@ with gr.Blocks(css="""#chatbot { font-size: 14px; min-height: 1200; }""") as dem
315
  {"role": "assistant", "content": f'[ERROR]: {str(e)}'}
316
  ]
317
 
 
 
 
 
 
 
318
  msg.submit(
319
  respond,
320
  [msg, chatbot, url, file, openAI_key, model],
321
- [chatbot]
322
  )
323
 
324
  demo.launch()
 
269
  # Chat Interface
270
  chatbot = gr.Chatbot(label="Chat History", type="messages")
271
  msg = gr.Textbox(label="Enter your question here", lines=2)
272
+ submit_btn = gr.Button("Submit")
273
  clear = gr.ClearButton([msg, chatbot])
274
 
275
  # Example Questions
 
316
  {"role": "assistant", "content": f'[ERROR]: {str(e)}'}
317
  ]
318
 
319
+ submit_btn.click(
320
+ respond,
321
+ [msg, chatbot, url, file, openAI_key, model],
322
+ [msg, chatbot]
323
+ )
324
+
325
  msg.submit(
326
  respond,
327
  [msg, chatbot, url, file, openAI_key, model],
328
+ [msg, chatbot]
329
  )
330
 
331
  demo.launch()