gradio/demo/flip_image.py
2020-08-10 22:21:16 -05:00

27 lines
502 B
Python

import gradio as gr
import numpy as np
from time import time
def flip(image):
start = time()
return image
def flip2(image):
start = time()
return np.fliplr(image)
def flip10(i1, i2, i3, i4, i5):
return i1 + i2
gr.Interface(flip2,
["webcam"],
["image"],
examples=[
["images/cheetah1.jpg"],
["images/cheetah2.jpg"],
["images/lion.jpg"],
]
).launch(share=True)