muneebable commited on
Commit
7004458
·
verified ·
1 Parent(s): 445e396

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -151,7 +151,7 @@ def resize_image(image_path, max_size=400):
151
  img = Image.open(image_path).convert('RGB')
152
  ratio = max_size / max(img.size)
153
  new_size = tuple([int(x*ratio) for x in img.size])
154
- img = img.resize(new_size, Image.ANTIALIAS)
155
  return np.array(img)
156
 
157
  # Example images
@@ -166,7 +166,7 @@ def resize_image(image_path, max_size=400):
166
 
167
  examples = [
168
  ["assets/content_1.jpg",
169
- "style_1.jpg"],
170
  ["assets/content_2.jpg",
171
  "assets/style_2.jpg"],
172
  ["assets/content_3.png",
 
151
  img = Image.open(image_path).convert('RGB')
152
  ratio = max_size / max(img.size)
153
  new_size = tuple([int(x*ratio) for x in img.size])
154
+ img = img.resize(new_size, Image.Resampling.LANCZOS)
155
  return np.array(img)
156
 
157
  # Example images
 
166
 
167
  examples = [
168
  ["assets/content_1.jpg",
169
+ "assets/style_1.jpg"],
170
  ["assets/content_2.jpg",
171
  "assets/style_2.jpg"],
172
  ["assets/content_3.png",