ashui commited on
Commit
7c8010b
1 Parent(s): 881e138

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -96,7 +96,7 @@ block = gr.Blocks(
96
  radius_size=gr.themes.sizes.radius_none,
97
  text_size=gr.themes.sizes.text_md
98
  )
99
- ).queue(concurrency_count=3)
100
  with block:
101
  with gr.Row():
102
  with gr.Column():
@@ -184,9 +184,9 @@ with block:
184
 
185
  # once user upload an image, the original image is stored in `original_image`
186
  def store_img(img):
187
- # 图片太大传输太慢了
188
- if min(img.shape[0], img.shape[1]) > 1024:
189
- img = resize_image(img, 1024)
190
  return img, img, [], None # when new image is uploaded, `selected_points` should be empty
191
 
192
  input_image.upload(
 
96
  radius_size=gr.themes.sizes.radius_none,
97
  text_size=gr.themes.sizes.text_md
98
  )
99
+ ).queue(concurrency_count=4)
100
  with block:
101
  with gr.Row():
102
  with gr.Column():
 
184
 
185
  # once user upload an image, the original image is stored in `original_image`
186
  def store_img(img):
187
+ # image upload is too slow
188
+ if min(img.shape[0], img.shape[1]) > 896:
189
+ img = resize_image(img, 896)
190
  return img, img, [], None # when new image is uploaded, `selected_points` should be empty
191
 
192
  input_image.upload(