Ifeeab05 commited on
Commit
9b47ab0
·
verified ·
1 Parent(s): 3c9f729

Create image.py

Browse files
Files changed (1) hide show
  1. image.py +16 -0
image.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def display_image(img):
4
+ """Takes an image and returns it."""
5
+ return img
6
+
7
+ # Create a Gradio interface with an image input and image output
8
+ image_interface = gr.Interface(
9
+ fn=display_image,
10
+ inputs=gr.Image(type="pil", label="Upload an Image"),
11
+ outputs=gr.Image(type="pil", label="Your Image"),
12
+ title="Image Uploader and Viewer"
13
+ )
14
+
15
+ # Launch the interface
16
+ image_interface.launch()