mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
10 lines
245 B
Python
10 lines
245 B
Python
# Demo: (Image) -> (HighlightedText, KeyValues, HTML)
|
|
|
|
import gradio as gr
|
|
import numpy as np
|
|
|
|
def snap(image):
|
|
return np.flipud(image)
|
|
|
|
gr.Interface(snap, gr.inputs.Image(shape=(100,100), image_mode="L", source="webcam"), "image").launch()
|