mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-15 02:11:15 +08:00
14 lines
237 B
Python
14 lines
237 B
Python
import gradio as gr
|
|
import numpy as np
|
|
|
|
|
|
def snap(image):
|
|
return np.flipud(image)
|
|
|
|
|
|
iface = gr.Interface(snap, gr.inputs.Image(source="webcam", tool=None), "image")
|
|
|
|
iface.test_launch()
|
|
if __name__ == "__main__":
|
|
iface.launch()
|
|
|