Spaces:
Runtime error
Runtime error
File size: 324 Bytes
a3cde9f 4801698 a3cde9f d826833 e9911b2 c063475 c170487 5abb415 1cf797e 5abb415 a3cde9f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import gradio as gr
import cv2
def greet(video):
cap = cv2.VideoCapture(video)
succes, img = cap.read()
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
return gray
iface = gr.Interface(
fn=greet,
inputs=gr.Video(source = "webcam", format = "mp4", streaming = "True"),
outputs="image"
)
iface.launch()
|