Spaces:
Running
Running
ZaynZhu
commited on
Commit
Β·
f438072
1
Parent(s):
a3ef8aa
optimize layout
Browse files
app.py
CHANGED
|
@@ -56,7 +56,7 @@ RUNS_DIR.mkdir(parents=True, exist_ok=True)
|
|
| 56 |
|
| 57 |
TIMEOUT_SECONDS = 1800 # 30 minutes
|
| 58 |
RETENTION_HOURS = 1 # auto-clean runs older than N hours
|
| 59 |
-
DEFAULT_RIGHT_LOGO_PATH = ROOT / "
|
| 60 |
|
| 61 |
# ---------------------
|
| 62 |
# Utils
|
|
@@ -600,43 +600,44 @@ The framework builds upon [CAMEL-ai](https://github.com/camel-ai/camel).
|
|
| 600 |
""")
|
| 601 |
|
| 602 |
# -------- Input box --------
|
| 603 |
-
with gr.
|
| 604 |
-
|
| 605 |
-
|
| 606 |
-
|
| 607 |
-
|
| 608 |
-
|
| 609 |
-
|
| 610 |
-
|
| 611 |
-
|
| 612 |
-
|
| 613 |
-
|
| 614 |
-
)
|
| 615 |
-
|
| 616 |
-
with gr.Row():
|
| 617 |
-
with gr.Column():
|
| 618 |
-
conf_logo_in = gr.File(
|
| 619 |
-
label="π§© Optional: Conference Logo (defaults to NeurIPS logo)",
|
| 620 |
-
file_count="single",
|
| 621 |
file_types=["image"],
|
| 622 |
)
|
| 623 |
-
with gr.Column():
|
| 624 |
-
conf_preview = gr.Image(
|
| 625 |
-
value=str(DEFAULT_RIGHT_LOGO_PATH) if DEFAULT_RIGHT_LOGO_PATH.exists() else None,
|
| 626 |
-
label="Default conference logo preview",
|
| 627 |
-
interactive=False,
|
| 628 |
-
)
|
| 629 |
-
|
| 630 |
-
theme_in = gr.ColorPicker(label="π¨ Theme Color (optional)", value="#5E2E91")
|
| 631 |
-
|
| 632 |
-
run_btn = gr.Button("π Run", variant="primary")
|
| 633 |
-
|
| 634 |
-
# -------- Output box --------
|
| 635 |
-
with gr.Accordion("Output", open=True):
|
| 636 |
-
logs_out = gr.Textbox(label="π§Ύ Logs (8β10 minutes)", lines=30, max_lines=50)
|
| 637 |
-
zip_out = gr.File(label="π¦ Download Results (.zip)")
|
| 638 |
-
overleaf_out = gr.HTML(label="Open in Overleaf")
|
| 639 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 640 |
run_btn.click(
|
| 641 |
fn=run_pipeline,
|
| 642 |
inputs=[arxiv_in, pdf_in, key_in, inst_logo_in, conf_logo_in, theme_in],
|
|
|
|
| 56 |
|
| 57 |
TIMEOUT_SECONDS = 1800 # 30 minutes
|
| 58 |
RETENTION_HOURS = 1 # auto-clean runs older than N hours
|
| 59 |
+
DEFAULT_RIGHT_LOGO_PATH = ROOT / "template" / "logos" / "right_logo.png"
|
| 60 |
|
| 61 |
# ---------------------
|
| 62 |
# Utils
|
|
|
|
| 600 |
""")
|
| 601 |
|
| 602 |
# -------- Input box --------
|
| 603 |
+
with gr.Row():
|
| 604 |
+
# ========== LEFT: INPUT ==========
|
| 605 |
+
with gr.Column(scale=1):
|
| 606 |
+
with gr.Accordion("Input", open=True):
|
| 607 |
+
arxiv_in = gr.Textbox(label="π ArXiv URL (choose one)", placeholder="https://arxiv.org/abs/2505.xxxxx")
|
| 608 |
+
pdf_in = gr.File(label="π Upload PDF (choose one)")
|
| 609 |
+
key_in = gr.Textbox(label="π OpenAI API Key", placeholder="sk-...", type="password")
|
| 610 |
+
|
| 611 |
+
inst_logo_in = gr.File(
|
| 612 |
+
label="π·οΈ Institutional Logo (optional, multiple allowed)",
|
| 613 |
+
file_count="multiple",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 614 |
file_types=["image"],
|
| 615 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 616 |
|
| 617 |
+
with gr.Row():
|
| 618 |
+
with gr.Column():
|
| 619 |
+
conf_logo_in = gr.File(
|
| 620 |
+
label="π§© Optional: Conference Logo (defaults to NeurIPS logo)",
|
| 621 |
+
file_count="single",
|
| 622 |
+
file_types=["image"],
|
| 623 |
+
)
|
| 624 |
+
with gr.Column():
|
| 625 |
+
conf_preview = gr.Image(
|
| 626 |
+
value=str(DEFAULT_RIGHT_LOGO_PATH) if DEFAULT_RIGHT_LOGO_PATH.exists() else None,
|
| 627 |
+
label="Default conference logo preview",
|
| 628 |
+
interactive=False,
|
| 629 |
+
)
|
| 630 |
+
|
| 631 |
+
theme_in = gr.ColorPicker(label="π¨ Theme Color (optional)", value="#5E2E91")
|
| 632 |
+
run_btn = gr.Button("π Run", variant="primary")
|
| 633 |
+
|
| 634 |
+
# ========== RIGHT: OUTPUT ==========
|
| 635 |
+
with gr.Column(scale=1):
|
| 636 |
+
with gr.Accordion("Output", open=True):
|
| 637 |
+
logs_out = gr.Textbox(label="π§Ύ Logs (8β10 minutes)", lines=30, max_lines=50)
|
| 638 |
+
zip_out = gr.File(label="π¦ Download Results (.zip)")
|
| 639 |
+
overleaf_out = gr.HTML(label="Open in Overleaf")
|
| 640 |
+
|
| 641 |
run_btn.click(
|
| 642 |
fn=run_pipeline,
|
| 643 |
inputs=[arxiv_in, pdf_in, key_in, inst_logo_in, conf_logo_in, theme_in],
|