Spaces:
Runtime error
Runtime error
import gradio as gr | |
import cv2 | |
def process_image(input_image): | |
# Convert the image to grayscale | |
gray_image = cv2.cvtColor(input_image, cv2.COLOR_BGR2GRAY) | |
return gray_image | |
iface = gr.Interface(fn=process_image, inputs="image", outputs="image", | |
examples=['img.jpg']) | |
iface.launch() | |