Spaces:
Sleeping
Sleeping
Max Hager
commited on
Commit
•
507dc5e
1
Parent(s):
c1ee6a7
image
Browse files- .gitignore +1 -0
- app.py +10 -4
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
.env
|
app.py
CHANGED
@@ -1,7 +1,13 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
2 |
|
3 |
-
def
|
4 |
-
|
|
|
|
|
|
|
5 |
|
6 |
-
demo = gr.Interface(fn=
|
7 |
-
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
import requests
|
3 |
+
from PIL import Image
|
4 |
+
from io import BytesIO
|
5 |
|
6 |
+
def fetch_arxiv_image(arxiv_link):
|
7 |
+
# Example logic to fetch an image from an arXiv link
|
8 |
+
response = requests.get(arxiv_link)
|
9 |
+
img = Image.open(BytesIO(response.content))
|
10 |
+
return img
|
11 |
|
12 |
+
demo = gr.Interface(fn=fetch_arxiv_image, inputs="text", outputs="image")
|
13 |
+
demo.launch()
|