Koshti10 commited on
Commit
dd37974
·
verified ·
1 Parent(s): ab65083

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -0
main.py CHANGED
@@ -12,6 +12,7 @@ with gr.Blocks(theme="glass") as demo:
12
 
13
  chatbot = gr.Chatbot(type="messages", height=750)
14
  msg = gr.Textbox()
 
15
  clear = gr.ClearButton([msg, chatbot])
16
 
17
  def respond(message, chat_history):
@@ -22,6 +23,7 @@ with gr.Blocks(theme="glass") as demo:
22
  return "", chat_history
23
 
24
  msg.submit(respond, [msg, chatbot], [msg, chatbot])
 
25
 
26
  gr.Examples([
27
  ["How is penalty to be deducted from O&M bill of CNG 1200 SCMH compressor package against gas loss of 60,000 SCM in a month. Explain with detailed calculations."],
 
12
 
13
  chatbot = gr.Chatbot(type="messages", height=750)
14
  msg = gr.Textbox()
15
+ send_button = gr.Button("Send")
16
  clear = gr.ClearButton([msg, chatbot])
17
 
18
  def respond(message, chat_history):
 
23
  return "", chat_history
24
 
25
  msg.submit(respond, [msg, chatbot], [msg, chatbot])
26
+ send_button.click(respond, [msg, chatbot], [msg, chatbot])
27
 
28
  gr.Examples([
29
  ["How is penalty to be deducted from O&M bill of CNG 1200 SCMH compressor package against gas loss of 60,000 SCM in a month. Explain with detailed calculations."],