Spaces:
Sleeping
Sleeping
import gradio as gr | |
import requests | |
from PIL import Image | |
from io import BytesIO | |
def fetch_arxiv_image(arxiv_link): | |
# Example logic to fetch an image from an arXiv link | |
response = requests.get(arxiv_link) | |
img = Image.open(BytesIO(response.content)) | |
return img | |
demo = gr.Interface(fn=fetch_arxiv_image, inputs="text", outputs="image") | |
demo.launch() |