Weaita commited on
Commit
28157ff
·
1 Parent(s): 321972d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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
- zip_file = "image.zip"
10
- with zipfile.ZipFile(zip_file, 'w') as zip:
11
- zip.write("image")
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,