Spaces:
Sleeping
Sleeping
yuntian-deng
commited on
Commit
•
a465593
1
Parent(s):
11b4e34
Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ def fetch_arxiv_data(arxiv_id):
|
|
54 |
def update_fields(url_or_id):
|
55 |
arxiv_id = extract_arxiv_id(url_or_id)
|
56 |
if len(arxiv_id.strip().split('.')) != 2:
|
57 |
-
return '', '', ''
|
58 |
print (arxiv_id)
|
59 |
title, authors, abstract = fetch_arxiv_data(arxiv_id)
|
60 |
output = predict(title, authors, abstract)
|
@@ -108,12 +108,10 @@ with gr.Blocks() as demo:
|
|
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.",
|
|
|
54 |
def update_fields(url_or_id):
|
55 |
arxiv_id = extract_arxiv_id(url_or_id)
|
56 |
if len(arxiv_id.strip().split('.')) != 2:
|
57 |
+
return '', '', '', ''
|
58 |
print (arxiv_id)
|
59 |
title, authors, abstract = fetch_arxiv_data(arxiv_id)
|
60 |
output = predict(title, authors, abstract)
|
|
|
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 |
iface = gr.Interface(
|
112 |
fn=predict,
|
113 |
inputs=[title_box, author_box, abstract_box],
|
114 |
outputs=[output_box],
|
|
|
115 |
clear_btn=gr.Button("Clear", variant="secondary", visible=False),
|
116 |
title="Paper Selection Prediction",
|
117 |
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.",
|