Cachoups commited on
Commit
ecf4e44
·
verified ·
1 Parent(s): dbf1875

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -83,8 +83,8 @@ with gr.Blocks() as demo:
83
  def update_paragraphs(pdf1, pdf2):
84
  global stored_paragraphs_1, stored_paragraphs_2
85
  stored_paragraphs_1, stored_paragraphs_2 = extract_and_summarize(pdf1, pdf2)
86
- updated_dropdown_1 = gr.Dropdown.update(choices=[f"Paragraph {i+1}: {p[:100]}..." for i, p in enumerate(stored_paragraphs_1)], label="Select Paragraph from PDF 1")
87
- updated_dropdown_2 = gr.Dropdown.update(choices=[f"Paragraph {i+1}: {p[:100]}..." for i, p in enumerate(stored_paragraphs_2)], label="Select Paragraph from PDF 2")
88
  return updated_dropdown_1, updated_dropdown_2
89
 
90
  b1.click(fn=update_paragraphs, inputs=[pdf1, pdf2], outputs=[paragraph_1_dropdown, paragraph_2_dropdown])
 
83
  def update_paragraphs(pdf1, pdf2):
84
  global stored_paragraphs_1, stored_paragraphs_2
85
  stored_paragraphs_1, stored_paragraphs_2 = extract_and_summarize(pdf1, pdf2)
86
+ updated_dropdown_1 = [f"Paragraph {i+1}: {p[:100]}..." for i, p in enumerate(stored_paragraphs_1)]
87
+ updated_dropdown_2 = [f"Paragraph {i+1}: {p[:100]}..." for i, p in enumerate(stored_paragraphs_2)]
88
  return updated_dropdown_1, updated_dropdown_2
89
 
90
  b1.click(fn=update_paragraphs, inputs=[pdf1, pdf2], outputs=[paragraph_1_dropdown, paragraph_2_dropdown])