gradio/demo/blocks_webcam/run.py
Ömer Faruk Özdemir ad75b06f9a
custom-components (#985)
* custom-components
- create template components
- changes in PKG and requires comes from scripts/install_gradio.sh

* custom-components
- tweaks

* update-components
- tweaks

* update-components
- fix get_block_name

* update-components
- add webcam demo

* custom-components
- make use of get_block_name function whenever possible

* custom-components
- tweaks
2022-04-14 17:52:42 +03:00

15 lines
222 B
Python

import numpy as np
import gradio as gr
from gradio import Templates
def snap(image):
return np.flipud(image)
demo = gr.Interface(snap, Templates.Webcam(), gr.Image())
if __name__ == "__main__":
demo.launch()