Spaces:
Runtime error
Runtime error
Download app.py from SS8297/Playground: direct link, hf CLI and curl.
- Browser
- Download file 349 Bytes
-
https://huggingface.co/spaces/SS8297/Playground/resolve/main/app.py
- Command line
-
hf download hf://spaces/SS8297/Playground/app.py
-
curl -L -o app.py https://huggingface.co/spaces/SS8297/Playground/resolve/main/app.py
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() | |