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
Files changed (1) hide show
  1. app.py +21 -6
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
- logs_out = gr.Textbox(label="🧾 Logs (8–10 minutes)", lines=30, max_lines=50)
1632
- pdf_out = gr.HTML(label="πŸ“„ Poster (PDF Preview)")
1633
- zip_out = gr.File(
1634
- label="πŸ“¦ Download Results (.zip)(select **XeLaTeX** as the Overleaf compile engine.)"
1635
- )
1636
- run_btn.click(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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],