Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -243,6 +243,18 @@ css = """
|
|
| 243 |
background: #f3f4f6;
|
| 244 |
border-radius: 0.5rem;
|
| 245 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 246 |
"""
|
| 247 |
|
| 248 |
with gr.Blocks(theme=gr.themes.Default(), css=css) as iface:
|
|
@@ -259,9 +271,16 @@ with gr.Blocks(theme=gr.themes.Default(), css=css) as iface:
|
|
| 259 |
gr.Markdown("### π Import from arXiv")
|
| 260 |
arxiv_input = gr.Textbox(
|
| 261 |
lines=1,
|
| 262 |
-
placeholder="Enter arXiv URL or ID (e.g.,
|
| 263 |
-
label="arXiv Paper URL/ID"
|
|
|
|
| 264 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
fetch_button = gr.Button("π Fetch Paper Details", variant="secondary")
|
| 266 |
|
| 267 |
gr.Markdown("### π Or Enter Paper Details Manually")
|
|
@@ -325,8 +344,7 @@ with gr.Blocks(theme=gr.themes.Default(), css=css) as iface:
|
|
| 325 |
{paper['abstract']}
|
| 326 |
*{paper['note']}*
|
| 327 |
---
|
| 328 |
-
"""
|
| 329 |
-
)
|
| 330 |
|
| 331 |
# Event handlers
|
| 332 |
title_input.change(
|
|
@@ -358,4 +376,4 @@ with gr.Blocks(theme=gr.themes.Default(), css=css) as iface:
|
|
| 358 |
)
|
| 359 |
|
| 360 |
if __name__ == "__main__":
|
| 361 |
-
iface.launch()
|
|
|
|
| 243 |
background: #f3f4f6;
|
| 244 |
border-radius: 0.5rem;
|
| 245 |
}
|
| 246 |
+
.arxiv-link {
|
| 247 |
+
color: #2563eb;
|
| 248 |
+
text-decoration: underline;
|
| 249 |
+
font-size: 0.9em;
|
| 250 |
+
margin-top: 0.5em;
|
| 251 |
+
}
|
| 252 |
+
.arxiv-note {
|
| 253 |
+
color: #666;
|
| 254 |
+
font-size: 0.9em;
|
| 255 |
+
margin-top: 0.5em;
|
| 256 |
+
margin-bottom: 0.5em;
|
| 257 |
+
}
|
| 258 |
"""
|
| 259 |
|
| 260 |
with gr.Blocks(theme=gr.themes.Default(), css=css) as iface:
|
|
|
|
| 271 |
gr.Markdown("### π Import from arXiv")
|
| 272 |
arxiv_input = gr.Textbox(
|
| 273 |
lines=1,
|
| 274 |
+
placeholder="Enter arXiv URL or ID (e.g., 2501.09751)",
|
| 275 |
+
label="arXiv Paper URL/ID",
|
| 276 |
+
value="https://arxiv.org/abs/2501.09751" # Default example URL
|
| 277 |
)
|
| 278 |
+
gr.Markdown("""
|
| 279 |
+
<p class="arxiv-note">
|
| 280 |
+
Click input field to use example paper or browse papers at
|
| 281 |
+
<a href="https://arxiv.org" target="_blank" class="arxiv-link">arxiv.org</a>
|
| 282 |
+
</p>
|
| 283 |
+
""")
|
| 284 |
fetch_button = gr.Button("π Fetch Paper Details", variant="secondary")
|
| 285 |
|
| 286 |
gr.Markdown("### π Or Enter Paper Details Manually")
|
|
|
|
| 344 |
{paper['abstract']}
|
| 345 |
*{paper['note']}*
|
| 346 |
---
|
| 347 |
+
""")
|
|
|
|
| 348 |
|
| 349 |
# Event handlers
|
| 350 |
title_input.change(
|
|
|
|
| 376 |
)
|
| 377 |
|
| 378 |
if __name__ == "__main__":
|
| 379 |
+
iface.launch()
|