broadfield commited on
Commit
2fbd6b6
·
verified ·
1 Parent(s): 82c4ade

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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=SQ&start=ST&max_results=MR"
49
- r=requests.get(api.replace("SQ",q).replace("ST",str(st)).replace("MR",str(rn)))
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)