ash11sh commited on
Commit
9bf2d4d
β€’
1 Parent(s): 854393d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -164,9 +164,9 @@ def imsize(img, max_size=512, maintain_aspect_ratio=True):
164
 
165
 
166
  def rem_glass(input_img):
167
- # w_0, h_0 = input_img.size
168
  #resizing
169
- im = imsize(input_img, max_size=512, maintain_aspect_ratio=True)
170
 
171
  width, height = im.size
172
  ori_im = im.copy()
@@ -190,7 +190,7 @@ def rem_glass(input_img):
190
  # img = upscale(img, model_cran_v2)
191
 
192
  # scale image to original size
193
- img = img.resize((width, height))
194
  img.save("removal.png")
195
 
196
  inference_app(
 
164
 
165
 
166
  def rem_glass(input_img):
167
+ w_0, h_0 = input_img.size
168
  #resizing
169
+ im = imsize(input_img, max_size=256, maintain_aspect_ratio=False)
170
 
171
  width, height = im.size
172
  ori_im = im.copy()
 
190
  # img = upscale(img, model_cran_v2)
191
 
192
  # scale image to original size
193
+ img = img.resize((w_0, h_0))
194
  img.save("removal.png")
195
 
196
  inference_app(