renad0 commited on
Commit
badda48
·
verified ·
1 Parent(s): f20c462

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !pip install gradio
2
+ import gradio as gr
3
+
4
+ # Define a simple function that processes the uploaded image
5
+ def process_image(image):
6
+ return image # Simply return the uploaded image
7
+
8
+ # Create an interface with an Image upload input
9
+ demo = gr.Interface(
10
+ fn=process_image, # Function to be used
11
+ inputs=gr.Image(type="pil", label="Upload an Image"), # Image upload component
12
+ outputs=gr.Image(label="Processed Image") # Output component to display the image
13
+ )
14
+
15
+ # Launch the interface
16
+ demo.launch()