gradio/demo/webcam.py
2020-09-21 19:46:10 -04:00

15 lines
246 B
Python

# Demo: (Image) -> (Image)
import gradio as gr
import numpy as np
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()