File size: 229 Bytes
051ea30
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import gradio as gr
import cv2

def black_and_white(image):
    gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
    return gray_image

iface = gr.Interface(fn=black_and_white, inputs="image", outputs="image")
iface.launch()