Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import requests
|
2 |
import re
|
3 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
return output
|
16 |
|
17 |
|
18 |
-
import
|
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..."),
|