2020-06-11 02:34:53 +08:00
|
|
|
import gradio as gr
|
|
|
|
import numpy as np
|
2020-06-11 23:02:37 +08:00
|
|
|
from time import time
|
2020-06-11 02:34:53 +08:00
|
|
|
|
2020-07-09 06:09:52 +08:00
|
|
|
|
2020-06-11 02:34:53 +08:00
|
|
|
def flip(image):
|
2020-06-11 23:02:37 +08:00
|
|
|
start = time()
|
2020-07-17 03:56:36 +08:00
|
|
|
return image
|
2020-06-11 02:34:53 +08:00
|
|
|
|
2020-07-09 06:09:52 +08:00
|
|
|
|
2020-06-11 23:02:37 +08:00
|
|
|
def flip2(image):
|
|
|
|
start = time()
|
2020-07-17 03:56:36 +08:00
|
|
|
return np.fliplr(image)
|
2020-06-11 23:02:37 +08:00
|
|
|
|
2020-07-21 22:24:38 +08:00
|
|
|
def flip10(i1, i2, i3, i4, i5):
|
|
|
|
return i1 + i2
|
2020-06-11 23:02:37 +08:00
|
|
|
|
2020-07-22 00:36:23 +08:00
|
|
|
gr.Interface(flip2,
|
2020-08-11 03:30:15 +08:00
|
|
|
["webcam"],
|
2020-07-17 03:56:36 +08:00
|
|
|
["image"],
|
2020-07-01 07:31:26 +08:00
|
|
|
examples=[
|
2020-07-22 00:36:23 +08:00
|
|
|
["images/cheetah1.jpg"],
|
|
|
|
["images/cheetah2.jpg"],
|
|
|
|
["images/lion.jpg"],
|
2020-07-01 07:31:26 +08:00
|
|
|
]
|
2020-08-11 11:21:16 +08:00
|
|
|
).launch(share=True)
|