Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -504,19 +504,19 @@ with gr.Blocks(title="NER for Financial Statements", css=CUSTOM_CSS) as demo:
|
|
| 504 |
text_input.submit(fn=run_ner, inputs=text_input, outputs=text_output)
|
| 505 |
|
| 506 |
def handle_pdf(pdf_file):
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
|
| 521 |
analyze_pdf_btn.click(
|
| 522 |
fn=handle_pdf,
|
|
|
|
| 504 |
text_input.submit(fn=run_ner, inputs=text_input, outputs=text_output)
|
| 505 |
|
| 506 |
def handle_pdf(pdf_file):
|
| 507 |
+
download_html, legend_html, warn_html, debug_html = run_ner_pdf(pdf_file)
|
| 508 |
+
|
| 509 |
+
show = gr.Column(
|
| 510 |
+
visible=bool(download_html)
|
| 511 |
+
)
|
| 512 |
+
|
| 513 |
+
return (
|
| 514 |
+
download_html,
|
| 515 |
+
legend_html,
|
| 516 |
+
warn_html,
|
| 517 |
+
debug_html,
|
| 518 |
+
show
|
| 519 |
+
)
|
| 520 |
|
| 521 |
analyze_pdf_btn.click(
|
| 522 |
fn=handle_pdf,
|