gradio/demo/webcam.py
2020-08-28 11:05:19 -05:00

14 lines
227 B
Python

# Demo: (Image) -> (Image)
import gradio as gr
def snap(image):
return np.flipud(image)
io = gr.Interface(snap, gr.inputs.Image(shape=(100,100), image_mode="L", source="webcam"), "image")
io.test_launch()
io.launch()