import gradio as gr def greet(image): gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) return gray iface = gr.Interface(fn=greet, inputs="image", outputs="image") iface.launch()