Nikhil0987 commited on
Commit
fc5882b
·
verified ·
1 Parent(s): 17e0bb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -120,13 +120,11 @@ with st.container():
120
  submit_btn = gr.Button('Submit')
121
 
122
  # Event handler for submit button
123
- submit_btn.click(
124
- fn=add_text, inputs=[chatbot, txt], outputs=[chatbot], queue=False
125
- ).success(
126
- fn=generate_response, inputs=[chatbot, txt, pdf_upload1], outputs=[chatbot, txt]
127
- ).success(
128
- fn=render_file, inputs=[pdf_upload1], outputs=[show_img]
129
- )
130
 
131
  if __name__ == "__main__":
132
  gr.Interface(
@@ -137,4 +135,5 @@ if __name__ == "__main__":
137
  ).launch()
138
 
139
 
 
140
 
 
120
  submit_btn = gr.Button('Submit')
121
 
122
  # Event handler for submit button
123
+ @submit_btn.capture()
124
+ def on_submit():
125
+ add_text(chatbot, txt)
126
+ generate_response(chatbot, txt, pdf_upload1)
127
+ render_file(pdf_upload1)
 
 
128
 
129
  if __name__ == "__main__":
130
  gr.Interface(
 
135
  ).launch()
136
 
137
 
138
+
139