File size: 503 Bytes
badda48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr

# Define a simple function that processes the uploaded image
def process_image(image):
    return image  # Simply return the uploaded image

# Create an interface with an Image upload input
demo = gr.Interface(
    fn=process_image,                  # Function to be used
    inputs=gr.Image(type="pil", label="Upload an Image"),  # Image upload component
    outputs=gr.Image(label="Processed Image")  # Output component to display the image
)

# Launch the interface
demo.launch()