sachinkidzure commited on
Commit
76b09c4
·
verified ·
1 Parent(s): 7463e46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -247,8 +247,8 @@ with block:
247
  # once user upload an image, the original image is stored in `original_image`
248
  def store_img(img):
249
  # image upload is too slow
250
- if min(img.shape[0], img.shape[1]) > 512:
251
- img = resize_image(img, 512)
252
  if max(img.shape[0], img.shape[1])*1.0/min(img.shape[0], img.shape[1])>2.0:
253
  raise gr.Error('image aspect ratio cannot be larger than 2.0')
254
  return img, img, [], None # when new image is uploaded, `selected_points` should be empty
 
247
  # once user upload an image, the original image is stored in `original_image`
248
  def store_img(img):
249
  # image upload is too slow
250
+ if min(img.shape[0], img.shape[1]) > 1024:
251
+ img = resize_image(img, 1024)
252
  if max(img.shape[0], img.shape[1])*1.0/min(img.shape[0], img.shape[1])>2.0:
253
  raise gr.Error('image aspect ratio cannot be larger than 2.0')
254
  return img, img, [], None # when new image is uploaded, `selected_points` should be empty