Max Hager commited on
Commit
507dc5e
1 Parent(s): c1ee6a7
Files changed (2) hide show
  1. .gitignore +1 -0
  2. 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 greet(name):
4
- return "Hello " + name + "!!"
 
 
 
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
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()