gradio/demo/webcam.py

10 lines
245 B
Python
Raw Normal View History

2020-08-22 07:17:11 +08:00
# Demo: (Image) -> (HighlightedText, KeyValues, HTML)
2020-06-11 14:04:14 +08:00
import gradio as gr
import numpy as np
def snap(image):
2020-08-22 07:17:11 +08:00
return np.flipud(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()