gradio/demo/webcam.py

8 lines
179 B
Python
Raw Normal View History

2020-06-11 14:04:14 +08:00
import gradio as gr
import numpy as np
def snap(image):
2020-07-07 02:12:48 +08:00
return image
2020-06-11 14:04:14 +08:00
2020-08-11 03:30:15 +08:00
gr.Interface(snap, gr.inputs.Image(shape=(100,100), image_mode="L", source="webcam"), "image").launch()