gradio/demo/webcam/run.py

13 lines
216 B
Python
Raw Normal View History

2020-09-22 07:46:10 +08:00
import numpy as np
2020-08-28 23:56:03 +08:00
import gradio as gr
2020-06-11 14:04:14 +08:00
def snap(image):
2020-08-22 07:17:11 +08:00
return np.flipud(image)
2020-06-11 14:04:14 +08:00
2021-03-03 09:07:52 +08:00
iface = gr.Interface(snap, gr.inputs.Image(source="webcam", tool=None), "image")
2020-11-11 22:15:53 +08:00
if __name__ == "__main__":
iface.launch()