Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,14 +5,16 @@ from PIL import Image
|
|
5 |
|
6 |
# Simple function to flip an image upside down
|
7 |
def flip_image(image):
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
11 |
|
12 |
# Create a simple GUI
|
13 |
gr.Interface(fn=flip_image,
|
14 |
inputs="image",
|
15 |
-
outputs="
|
16 |
title="Flip An Image Upside Down",
|
17 |
examples = ["example.jpg"]
|
18 |
).launch();
|
|
|
5 |
|
6 |
# Simple function to flip an image upside down
|
7 |
def flip_image(image):
|
8 |
+
# Create zip file
|
9 |
+
zip_file = "image.zip"
|
10 |
+
with zipfile.ZipFile(zip_file, 'w') as zip:
|
11 |
+
zip.write("image.png")
|
12 |
+
return zip_file
|
13 |
|
14 |
# Create a simple GUI
|
15 |
gr.Interface(fn=flip_image,
|
16 |
inputs="image",
|
17 |
+
outputs="file",
|
18 |
title="Flip An Image Upside Down",
|
19 |
examples = ["example.jpg"]
|
20 |
).launch();
|