gagan3012 commited on
Commit
e1a1953
·
1 Parent(s): 0e908e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import requests
2
  import re
3
- from lookup import processCgi
4
 
5
  def fetch_bibtex(arxiv_link):
6
  # Extract the arXiv ID from the link
@@ -10,12 +10,17 @@ def fetch_bibtex(arxiv_link):
10
  # For simplicity, here's a placeholder for the BibTeX entry
11
  bibtex_entry = "Placeholder BibTeX for " + arxiv_id
12
 
13
- output = processCgi(arxiv_id)
 
 
 
 
 
14
 
15
  return output
16
 
17
 
18
- import gradio as gr
19
 
20
  interface = gr.Interface(fn=fetch_bibtex,
21
  inputs=gr.Textbox(lines=2, placeholder="Enter arXiv link here..."),
 
1
  import requests
2
  import re
3
+ import subprocess
4
 
5
  def fetch_bibtex(arxiv_link):
6
  # Extract the arXiv ID from the link
 
10
  # For simplicity, here's a placeholder for the BibTeX entry
11
  bibtex_entry = "Placeholder BibTeX for " + arxiv_id
12
 
13
+ command = "arxiv2bib"
14
+
15
+ result = subprocess.run([command, arxiv_id], stdout=subprocess.PIPE, text=True)
16
+
17
+ # Get the output
18
+ output = result.stdout
19
 
20
  return output
21
 
22
 
23
+ import radio as gr
24
 
25
  interface = gr.Interface(fn=fetch_bibtex,
26
  inputs=gr.Textbox(lines=2, placeholder="Enter arXiv link here..."),