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

Update app.py

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