isana25 commited on
Commit
7bcb930
·
verified ·
1 Parent(s): b869b5b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from PIL import Image
2
+ import gradio as gr
3
+
4
+ def convert_to_greyscale(img):
5
+ grey_img = img.convert("L")
6
+ return grey_img
7
+
8
+ iface = gr.Interface(
9
+ fn=convert_to_greyscale,
10
+ inputs=gr.Image(type="pil"),
11
+ outputs="image",
12
+ title="Image to Greyscale Converter",
13
+ description="Upload any image and it will be converted into a greyscale version."
14
+ )
15
+
16
+ iface.launch()