import gradio as gr | |
import cv2 | |
def image(img): | |
img=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) | |
return img | |
a=gr.inputs.Image(label="") | |
b=gr.outputs.Image(label="") | |
ui=gr.Interface(fn=image, inputs=a,outputs=b) | |
ui.launch() |
import gradio as gr | |
import cv2 | |
def image(img): | |
img=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) | |
return img | |
a=gr.inputs.Image(label="") | |
b=gr.outputs.Image(label="") | |
ui=gr.Interface(fn=image, inputs=a,outputs=b) | |
ui.launch() |