| 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() | |
| 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() | |