Playground / app.py
SS8297's picture
Update app.py
e2d75c1
Raw History Blame Contribute Delete
349 Bytes
import gradio as gr
import cv2 as cv
def annotate(image):
cv.rectangle(image, (int(10), int(10)), (int(100), int(100)), color = (0, 0, 255), thickness = 3)
return image
webcam = gr.Image(sources = ["webcam"], streaming = True, render= False)
webapp = gr.Interface(live = True, fn=annotate, inputs=webcam, outputs="video")
webapp.launch()