gaviego commited on
Commit
d25fd03
1 Parent(s): 5681734

experiment with b&w

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from PIL import Image
3
+
4
+ def bw(image_file:Image):
5
+ img = Image.open(image_file)
6
+ img = img.convert("L")
7
+ return img
8
+
9
+ iface = gr.Interface(fn=bw, inputs=gr.Image(type='filepath'), outputs=["image"])
10
+ iface.launch()