Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -95,6 +95,7 @@ def filter_paragraphs(keyword):
|
|
95 |
def clear_paragraphs():
|
96 |
global stored_paragraphs_1, stored_paragraphs_2
|
97 |
return gr.update(choices=stored_paragraphs_1, value=None), gr.update(choices=stored_paragraphs_2, value=None)
|
|
|
98 |
def process_paragraph_1_sum(paragraph):
|
99 |
try:
|
100 |
paragraph_index = int(paragraph.split(':')[0].replace('Paragraph ', '')) - 1
|
@@ -486,7 +487,7 @@ with gr.Blocks(theme='gradio/soft',js=js_func) as demo:
|
|
486 |
search_button = gr.Button("Search")
|
487 |
clear_button = gr.Button("Clear")
|
488 |
search_button.click(filter_paragraphs, inputs=keyword_input, outputs=[pdf1, pdf2])
|
489 |
-
clear_button.click(
|
490 |
# Extract paragraphs from PDFs and update dropdowns
|
491 |
def update_paragraphs(pdf1, pdf2):
|
492 |
global stored_paragraphs_1, stored_paragraphs_2
|
|
|
95 |
def clear_paragraphs():
|
96 |
global stored_paragraphs_1, stored_paragraphs_2
|
97 |
return gr.update(choices=stored_paragraphs_1, value=None), gr.update(choices=stored_paragraphs_2, value=None)
|
98 |
+
|
99 |
def process_paragraph_1_sum(paragraph):
|
100 |
try:
|
101 |
paragraph_index = int(paragraph.split(':')[0].replace('Paragraph ', '')) - 1
|
|
|
487 |
search_button = gr.Button("Search")
|
488 |
clear_button = gr.Button("Clear")
|
489 |
search_button.click(filter_paragraphs, inputs=keyword_input, outputs=[pdf1, pdf2])
|
490 |
+
clear_button.click(clear_paragraphs, inputs=[], outputs=[pdf1, pdf2])
|
491 |
# Extract paragraphs from PDFs and update dropdowns
|
492 |
def update_paragraphs(pdf1, pdf2):
|
493 |
global stored_paragraphs_1, stored_paragraphs_2
|