Raghav001 commited on
Commit
b4b9f6a
·
1 Parent(s): 68fb23e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -162,7 +162,7 @@ with gr.Blocks(css=".gradio-container {background-color: Tomato}, footer {visibi
162
  with gr.Column():
163
  md = gr.Markdown("Please Upload the PDF")
164
  chat_bot = gr.Chatbot(visible=False)
165
- msg_txt = gr.Textbox(visible = False)
166
  chat_bu = gr.Button(value='Clear', visible=False)
167
 
168
  file.change(up_file, [file], [txt, doc_bu, md]) #hiding the text
@@ -170,6 +170,16 @@ with gr.Blocks(css=".gradio-container {background-color: Tomato}, footer {visibi
170
  # msg_txt.submit(get_response, [msg_txt, chat_bot,doc_text_state, doc_emb_state], [msg_txt, chat_bot])
171
  chat_bu.click(get_response, [msg_txt, chat_bot,doc_text_state, doc_emb_state], [chat_bot])
172
 
 
 
 
 
 
 
 
 
 
 
173
  if __name__ == "__main__":
174
  demo.queue().launch()
175
  # demo.queue().launch(share=False, server_name='172.22.2.54', server_port=9191)
 
162
  with gr.Column():
163
  md = gr.Markdown("Please Upload the PDF")
164
  chat_bot = gr.Chatbot(visible=False)
165
+ msg_txt = gr.Textbox(label='Ask Questions', placeholder='write',visible = False)
166
  chat_bu = gr.Button(value='Clear', visible=False)
167
 
168
  file.change(up_file, [file], [txt, doc_bu, md]) #hiding the text
 
170
  # msg_txt.submit(get_response, [msg_txt, chat_bot,doc_text_state, doc_emb_state], [msg_txt, chat_bot])
171
  chat_bu.click(get_response, [msg_txt, chat_bot,doc_text_state, doc_emb_state], [chat_bot])
172
 
173
+
174
+ # msg_txt = gr.Textbox(label='Ask Questions', placeholder='write', visible=False)
175
+ # chat_bu = gr.Button(value='Proceed', visible=False)
176
+
177
+ # file.change(up_file, [file], [txt, doc_bu, md])
178
+ # doc_bu.click(doc_emb, [txt], [doc_text_state, doc_emb_state, msg_txt, chat_bu, md, chat_bot])
179
+ # chat_bu.click(get_response, [msg_txt, chat_bot, doc_text_state, doc_emb_state], [chat_bot])
180
+
181
+
182
+
183
  if __name__ == "__main__":
184
  demo.queue().launch()
185
  # demo.queue().launch(share=False, server_name='172.22.2.54', server_port=9191)