Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 =
|
87 |
-
updated_dropdown_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])
|