jackycedar commited on
Commit
3a3a50d
·
1 Parent(s): cc7c76e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -231,7 +231,7 @@ def pdfv1(files, chainType):
231
 
232
  output = extractPDF(new_path, chainType)
233
 
234
- return output
235
 
236
  def pdfv2(files, chainType):
237
 
@@ -278,8 +278,8 @@ with gr.Blocks() as demo:
278
  doSum1 = gr.Button("Summarise")
279
  out1 = gr.Textbox(label="Summary")
280
 
281
- inp1.change(pdfv1, inputs=[inp1,chainType1], outputs=[out1])
282
- doSum1.click(pdfv1, inputs=[inp1,chainType1], outputs=[out1])
283
  outIndex1 = gr.File(label="Index.json")
284
  gr.Markdown("""# Q&A""")
285
  question1 = gr.Textbox(label="Question related to the pdf", placeholder = "Question...")
 
231
 
232
  output = extractPDF(new_path, chainType)
233
 
234
+ return output, new_path
235
 
236
  def pdfv2(files, chainType):
237
 
 
278
  doSum1 = gr.Button("Summarise")
279
  out1 = gr.Textbox(label="Summary")
280
 
281
+ inp1.change(pdfv1, inputs=[inp1,chainType1], outputs=[out1, outIndex1])
282
+ doSum1.click(pdfv1, inputs=[inp1,chainType1], outputs=[out1, outIndex1])
283
  outIndex1 = gr.File(label="Index.json")
284
  gr.Markdown("""# Q&A""")
285
  question1 = gr.Textbox(label="Question related to the pdf", placeholder = "Question...")