Spaces:
Running
Running
Push Bot
commited on
Commit
Β·
e5b2e62
1
Parent(s):
b67f335
Fix camel-ai NameError: define pdf_file_out and proper UI layout; wire run outputs and image preview
Browse files
app.py
CHANGED
|
@@ -1628,12 +1628,27 @@ This work, developed in collaboration with [TVG@Oxford](https://torrvision.com/i
|
|
| 1628 |
# ========== RIGHT: OUTPUT ==========
|
| 1629 |
with gr.Column(scale=1):
|
| 1630 |
with gr.Accordion("Output", open=True):
|
| 1631 |
-
|
| 1632 |
-
|
| 1633 |
-
|
| 1634 |
-
|
| 1635 |
-
|
| 1636 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1637 |
fn=run_pipeline,
|
| 1638 |
inputs=[arxiv_in, pdf_in, key_in, inst_logo_in, conf_logo_in, theme_in],
|
| 1639 |
outputs=[logs_out, pdf_out, pdf_file_out, zip_out, overleaf_out],
|
|
|
|
| 1628 |
# ========== RIGHT: OUTPUT ==========
|
| 1629 |
with gr.Column(scale=1):
|
| 1630 |
with gr.Accordion("Output", open=True):
|
| 1631 |
+
# Preview on top
|
| 1632 |
+
img_out = gr.Image(label="πΌοΈ Poster (Image Preview)", interactive=False)
|
| 1633 |
+
# Logs in the middle
|
| 1634 |
+
logs_out = gr.Textbox(label="π§Ύ Logs", lines=10, max_lines=20)
|
| 1635 |
+
# Downloads at bottom
|
| 1636 |
+
pdf_out = gr.HTML(label="π Poster (PDF Preview)", visible=False)
|
| 1637 |
+
with gr.Row():
|
| 1638 |
+
pdf_file_out = gr.File(label="π Download Poster (PDF)")
|
| 1639 |
+
zip_out = gr.File(label="π¦ Download Results (.zip)")
|
| 1640 |
+
overleaf_out = gr.HTML(label="Open in Overleaf")
|
| 1641 |
+
# Debug (hidden)
|
| 1642 |
+
debug_zip_btn= gr.Button("π Test repo output.zip", variant="secondary", visible=False)
|
| 1643 |
+
debug_zip_out= gr.HTML(label="π Real Output Preview", visible=False)
|
| 1644 |
+
debug_zip_img= gr.Image(label="π Real Output Image", interactive=False, visible=False)
|
| 1645 |
+
debug_zip_pdfpath = gr.Textbox(visible=False)
|
| 1646 |
+
debug_last_btn= gr.Button("π Test last pipeline zip", variant="secondary", visible=False)
|
| 1647 |
+
debug_last_out= gr.HTML(label="π Last Pipeline Preview", visible=False)
|
| 1648 |
+
debug_last_img= gr.Image(label="π Last Output Image", interactive=False, visible=False)
|
| 1649 |
+
debug_last_pdfpath = gr.Textbox(visible=False)
|
| 1650 |
+
|
| 1651 |
+
_run_evt = run_btn.click(
|
| 1652 |
fn=run_pipeline,
|
| 1653 |
inputs=[arxiv_in, pdf_in, key_in, inst_logo_in, conf_logo_in, theme_in],
|
| 1654 |
outputs=[logs_out, pdf_out, pdf_file_out, zip_out, overleaf_out],
|