Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -535,4 +535,30 @@ with gr.Blocks(theme=theme) as interface:
|
|
| 535 |
|
| 536 |
with gr.Row():
|
| 537 |
with gr.Column():
|
| 538 |
-
download_html_btn =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 535 |
|
| 536 |
with gr.Row():
|
| 537 |
with gr.Column():
|
| 538 |
+
download_html_btn = gr.File(
|
| 539 |
+
label="Download Relat贸rio HTML",
|
| 540 |
+
type="filepath",
|
| 541 |
+
interactive=False
|
| 542 |
+
)
|
| 543 |
+
with gr.Column():
|
| 544 |
+
download_pdf_btn = gr.File(
|
| 545 |
+
label="Download Relat贸rio PDF",
|
| 546 |
+
type="filepath",
|
| 547 |
+
interactive=False
|
| 548 |
+
)
|
| 549 |
+
|
| 550 |
+
# Conectar eventos
|
| 551 |
+
generate_btn.click(
|
| 552 |
+
fn=process_files,
|
| 553 |
+
inputs=[html_file, excel_files],
|
| 554 |
+
outputs=[output_html, download_html_btn, download_pdf_btn],
|
| 555 |
+
api_name="generate_report"
|
| 556 |
+
)
|
| 557 |
+
|
| 558 |
+
if __name__ == "__main__":
|
| 559 |
+
interface.launch(
|
| 560 |
+
share=False,
|
| 561 |
+
server_name="0.0.0.0",
|
| 562 |
+
server_port=7860,
|
| 563 |
+
show_error=True
|
| 564 |
+
)
|