Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,12 @@ from PIL import Image
|
|
5 |
|
6 |
# Simple function to flip an image upside down
|
7 |
def flip_image(image):
|
|
|
|
|
8 |
# Create zip file
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
return zip_file
|
13 |
|
14 |
# Create a simple GUI
|
15 |
gr.Interface(fn=flip_image,
|
|
|
5 |
|
6 |
# Simple function to flip an image upside down
|
7 |
def flip_image(image):
|
8 |
+
|
9 |
+
image = Image.fromarray(np.uint8(image))
|
10 |
# Create zip file
|
11 |
+
with zipfile.ZipFile("image.zip", 'w') as zip:
|
12 |
+
zip.write(image)
|
13 |
+
return "image.zip"
|
|
|
14 |
|
15 |
# Create a simple GUI
|
16 |
gr.Interface(fn=flip_image,
|