gradio/demo/webcam/run.py

15 lines
242 B
Python
Raw Normal View History

2020-08-28 23:56:03 +08:00
import gradio as gr
def snap(image, video):
return [image, video]
2020-06-11 14:04:14 +08:00
demo = gr.Interface(
snap,
[gr.Image(sources=["webcam"]), gr.Video(sources=["webcam"])],
["image", "video"],
)
2022-03-29 06:52:52 +08:00
2020-11-11 22:15:53 +08:00
if __name__ == "__main__":
2022-03-29 06:52:52 +08:00
demo.launch()