gagan3012 commited on
Commit
9b88e9e
·
1 Parent(s): 0cd7cc1

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import re
3
+
4
+ def fetch_bibtex(arxiv_link):
5
+ # Extract the arXiv ID from the link
6
+ arxiv_id = re.findall(r'arxiv\.org\/abs\/([\w\.]+)', arxiv_link)[0]
7
+
8
+ # Use an API or web scraping method to fetch the BibTeX
9
+ # For simplicity, here's a placeholder for the BibTeX entry
10
+ bibtex_entry = "Placeholder BibTeX for " + arxiv_id
11
+
12
+ return bibtex_entry
13
+
14
+
15
+ import gradio as gr
16
+
17
+ interface = gr.Interface(fn=fetch_bibtex,
18
+ inputs=gr.inputs.Textbox(lines=2, placeholder="Enter arXiv link here..."),
19
+ outputs="text")
20
+
21
+ interface.launch()