Spaces:
No application file
No application file
| 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) |