Spaces:
Running
on
Zero
Running
on
Zero
yuntian-deng
commited on
Commit
•
11b4e34
1
Parent(s):
0506a5f
Update app.py
Browse files
app.py
CHANGED
@@ -107,23 +107,21 @@ with gr.Blocks() as demo:
|
|
107 |
title_box = gr.Textbox(label="Paper Title", placeholder="Enter paper title", value=example_title)
|
108 |
author_box = gr.Textbox(label="Authors (separated by comma)", placeholder="Enter authors (separated by comma)", value=example_authors)
|
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 |
-
|
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 |
-
|
116 |
iface = gr.Interface(
|
117 |
fn=predict,
|
118 |
inputs=[title_box, author_box, abstract_box],
|
119 |
outputs=[output_box],
|
120 |
-
submit_btn=
|
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,
|
125 |
concurrency_limit=1
|
126 |
)
|
|
|
|
|
|
|
127 |
|
128 |
-
|
129 |
demo.queue(max_size=20).launch()
|
|
|
107 |
title_box = gr.Textbox(label="Paper Title", placeholder="Enter paper title", value=example_title)
|
108 |
author_box = gr.Textbox(label="Authors (separated by comma)", placeholder="Enter authors (separated by comma)", value=example_authors)
|
109 |
abstract_box = gr.TextArea(label="Abstract", placeholder="Enter abstract", value=example_abstract)
|
|
|
110 |
output_box = gr.Textbox(label="Predicted Selection Probability")
|
111 |
+
submit_btn = gr.Button("Predict", variant="primary")
|
|
|
|
|
|
|
112 |
iface = gr.Interface(
|
113 |
fn=predict,
|
114 |
inputs=[title_box, author_box, abstract_box],
|
115 |
outputs=[output_box],
|
116 |
+
submit_btn=submit_btn,
|
117 |
clear_btn=gr.Button("Clear", variant="secondary", visible=False),
|
118 |
title="Paper Selection Prediction",
|
119 |
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.",
|
120 |
live=False,
|
121 |
concurrency_limit=1
|
122 |
)
|
123 |
+
arxiv_box = gr.Textbox(label="[Optional] Autofill using arXiv URL/ID", placeholder="[Optional] Autofill using arXiv URL/ID")
|
124 |
+
autofill_btn = gr.Button("Predict using arXiv URL/ID", variant="secondary")
|
125 |
+
autofill_btn.click(update_fields, inputs=[arxiv_box], outputs=[title_box, author_box, abstract_box, output_box], concurrency_limit=1)
|
126 |
|
|
|
127 |
demo.queue(max_size=20).launch()
|