Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,7 +109,7 @@ with gr.Blocks() as demo:
|
|
| 109 |
abstract_box = gr.TextArea(label="Abstract", placeholder="Enter abstract", value=example_abstract)
|
| 110 |
arxiv_box = gr.Textbox(label="[Optional] Autofill using arXiv URL/ID", placeholder="[Optional] Autofill using arXiv URL/ID")
|
| 111 |
output_box = gr.Textbox(label="Predicted Selection Probability")
|
| 112 |
-
autofill_btn = gr.Button("Autofill using arXiv")
|
| 113 |
autofill_btn.click(update_fields, inputs=[arxiv_box], outputs=[title_box, author_box, abstract_box, output_box], concurrency_limit=1)
|
| 114 |
#arxiv_box.input(update_fields, inputs=[arxiv_box], outputs=[title_box, author_box, abstract_box])
|
| 115 |
|
|
@@ -117,7 +117,8 @@ with gr.Blocks() as demo:
|
|
| 117 |
fn=predict,
|
| 118 |
inputs=[title_box, author_box, abstract_box],
|
| 119 |
outputs=[output_box],
|
| 120 |
-
submit_btn=gr.Button("Predict", variant="primary")
|
|
|
|
| 121 |
title="Paper Selection Prediction",
|
| 122 |
description="Predict if @_akhaliq will select your paper into Hugging Face papers. Enter the title, authors, and abstract of your paper, or enter an arXiv URL/ID.",
|
| 123 |
live=False,
|
|
|
|
| 109 |
abstract_box = gr.TextArea(label="Abstract", placeholder="Enter abstract", value=example_abstract)
|
| 110 |
arxiv_box = gr.Textbox(label="[Optional] Autofill using arXiv URL/ID", placeholder="[Optional] Autofill using arXiv URL/ID")
|
| 111 |
output_box = gr.Textbox(label="Predicted Selection Probability")
|
| 112 |
+
autofill_btn = gr.Button("Autofill using arXiv", variant="primary")
|
| 113 |
autofill_btn.click(update_fields, inputs=[arxiv_box], outputs=[title_box, author_box, abstract_box, output_box], concurrency_limit=1)
|
| 114 |
#arxiv_box.input(update_fields, inputs=[arxiv_box], outputs=[title_box, author_box, abstract_box])
|
| 115 |
|
|
|
|
| 117 |
fn=predict,
|
| 118 |
inputs=[title_box, author_box, abstract_box],
|
| 119 |
outputs=[output_box],
|
| 120 |
+
submit_btn=gr.Button("Predict", variant="primary"),
|
| 121 |
+
clear_btn=gr.Button("Clear", variant="secondary", visible=False),
|
| 122 |
title="Paper Selection Prediction",
|
| 123 |
description="Predict if @_akhaliq will select your paper into Hugging Face papers. Enter the title, authors, and abstract of your paper, or enter an arXiv URL/ID.",
|
| 124 |
live=False,
|