mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
ad75b06f9a
* 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
15 lines
222 B
Python
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()
|