Spaces:
No application file
No application file
File size: 474 Bytes
9b47ab0 fd1b677 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
def display_image(img):
"""Takes an image and returns it."""
return img
# Create a Gradio interface with an image input and image output
image_interface = gr.Interface(
fn=display_image,
inputs=gr.Image(type="pil", label="Upload an Image"),
outputs=gr.Image(type="pil", label="Your Image"),
title="Image Uploader and Viewer"
)
# Launch the interface, suitable for Hugging Face Spaces
image_interface.launch(share=True, debug=False) |