Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
-
from PIL import Image
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
return
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
|
|
3 |
|
4 |
+
# Simple function to flip an image upside down
|
5 |
+
def flip_image(image):
|
6 |
+
image_output = np.flipud(image)
|
7 |
+
return image, image_output
|
8 |
+
|
9 |
+
# Create a simple GUI
|
10 |
+
gr.Interface(fn=flip_image,
|
11 |
+
inputs="image",
|
12 |
+
outputs=["image","image"],
|
13 |
+
title="Flip An Image Upside Down",
|
14 |
+
examples = ["ai_images.png"]
|
15 |
+
).launch();
|