mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
14 lines
295 B
Python
14 lines
295 B
Python
import gradio as gr
|
|
import numpy as np
|
|
from time import time
|
|
|
|
def flip(image):
|
|
start = time()
|
|
return np.flipud(image), time() - start
|
|
|
|
def flip2(image):
|
|
start = time()
|
|
return np.fliplr(image), time() - start
|
|
|
|
|
|
gr.Interface([flip, flip2], "imagein", ["image", "textbox"]).launch() |