Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!pip install arxiv > /dev/null
|
2 |
+
|
3 |
+
import gradio as gr
|
4 |
+
import arxiv
|
5 |
+
|
6 |
+
search = arxiv.Search(
|
7 |
+
query = "cs.LG",
|
8 |
+
max_results = 50,
|
9 |
+
sort_by = arxiv.SortCriterion.SubmittedDate
|
10 |
+
)
|
11 |
+
|
12 |
+
with gr.Blocks() as demo:
|
13 |
+
gr.Markdown("<center><h1>My ArXiv</h1></center>")
|
14 |
+
with gr.Column():
|
15 |
+
for arxiv_paper in search.results():
|
16 |
+
with gr.Column():
|
17 |
+
with gr.Column():
|
18 |
+
gr.Markdown("<center><h3>" + arxiv_paper.title + "</h3></center>")
|
19 |
+
gr.Markdown(arxiv_paper.summary)
|
20 |
+
with gr.Row():
|
21 |
+
button = gr.Button("More like this! π")
|
22 |
+
#button.click(flip_image, inputs=image_input, outputs=image_output)
|
23 |
+
gr.Button("Less like this! π")
|
24 |
+
|
25 |
+
demo.launch()
|