Spaces:
Runtime error
Runtime error
EliottZemour
commited on
Commit
•
09c17f8
1
Parent(s):
f3bd71a
update readme
Browse files- app.py +16 -6
- arxiv_util.py +3 -0
app.py
CHANGED
@@ -65,13 +65,23 @@ def create_html_card(arxiv_link):
|
|
65 |
|
66 |
demo = gr.Blocks(css=CSS)
|
67 |
with demo:
|
68 |
-
gr.Markdown("#
|
|
|
|
|
|
|
|
|
|
|
69 |
gr.Markdown(
|
70 |
-
"
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
75 |
)
|
76 |
|
77 |
with gr.Column():
|
|
|
65 |
|
66 |
demo = gr.Blocks(css=CSS)
|
67 |
with demo:
|
68 |
+
gr.Markdown("# arXiv Cards Generator ⚙️")
|
69 |
+
gr.HTML("""
|
70 |
+
<p align="center">
|
71 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/7/7a/ArXiv_logo_2022.png" alt="report" width="200">
|
72 |
+
</p>
|
73 |
+
""")
|
74 |
gr.Markdown(
|
75 |
+
"""
|
76 |
+
Need a simple and visual way to share arXiv papers on presentations, blogposts, messages?
|
77 |
+
This gradio demo allows for creating arXiv cards including:
|
78 |
+
- arXiv Identifier
|
79 |
+
- Title
|
80 |
+
- Authors
|
81 |
+
- Abstract
|
82 |
+
|
83 |
+
Simply paste the url link of the arXiv paper and generate!
|
84 |
+
"""
|
85 |
)
|
86 |
|
87 |
with gr.Column():
|
arxiv_util.py
CHANGED
@@ -41,6 +41,9 @@ def get_paper_info(url):
|
|
41 |
|
42 |
title = paper["title"]
|
43 |
authors = paper["authors"]
|
|
|
|
|
|
|
44 |
abstract = paper["summary"]
|
45 |
linktopdf = None
|
46 |
linktoabs = None
|
|
|
41 |
|
42 |
title = paper["title"]
|
43 |
authors = paper["authors"]
|
44 |
+
if len(authors)>5:
|
45 |
+
authors = authors[:6]
|
46 |
+
authors[5] = {'name': 'and others...'}
|
47 |
abstract = paper["summary"]
|
48 |
linktopdf = None
|
49 |
linktoabs = None
|