Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,8 +45,8 @@ function closefn(inn) {
|
|
| 45 |
</script>
|
| 46 |
"""
|
| 47 |
def search(q,rn,st):
|
| 48 |
-
api="http://export.arxiv.org/api/query?search_query=
|
| 49 |
-
r=requests.get(api
|
| 50 |
cont=xmltodict.parse(r.content)['feed']['entry']
|
| 51 |
html=""
|
| 52 |
for i,c in enumerate(cont):
|
|
@@ -85,7 +85,7 @@ with gr.Blocks(css=style,head=head) as b:
|
|
| 85 |
with gr.Row():
|
| 86 |
query=gr.Textbox(label="Query")
|
| 87 |
num=gr.Number(label="Count",step=1,value=10,interactive=False)
|
| 88 |
-
with gr.Row()
|
| 89 |
sub=gr.Button(size='lg')
|
| 90 |
with gr.Row():
|
| 91 |
prev_btn=gr.Button("Previous",interactive=False)
|
|
|
|
| 45 |
</script>
|
| 46 |
"""
|
| 47 |
def search(q,rn,st):
|
| 48 |
+
api=f"http://export.arxiv.org/api/query?search_query={str(q)}&start={str(st)}&max_results={str(rn)}"
|
| 49 |
+
r=requests.get(api)
|
| 50 |
cont=xmltodict.parse(r.content)['feed']['entry']
|
| 51 |
html=""
|
| 52 |
for i,c in enumerate(cont):
|
|
|
|
| 85 |
with gr.Row():
|
| 86 |
query=gr.Textbox(label="Query")
|
| 87 |
num=gr.Number(label="Count",step=1,value=10,interactive=False)
|
| 88 |
+
with gr.Row():
|
| 89 |
sub=gr.Button(size='lg')
|
| 90 |
with gr.Row():
|
| 91 |
prev_btn=gr.Button("Previous",interactive=False)
|