Spaces:
Running
Running
tangpan360
commited on
Commit
•
a286203
1
Parent(s):
3e913e7
Add application file
Browse files- flip_image.py +10 -0
flip_image.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
def flip_image(input_img):
|
5 |
+
# 使用 numpy 水平翻转图像
|
6 |
+
flipped_image = np.fliplr(input_img)
|
7 |
+
return flipped_image
|
8 |
+
|
9 |
+
demo = gr.Interface(flip_image, gr.Image(), "image")
|
10 |
+
demo.launch(share=True)
|