Spaces:
Running
on
A10G
Running
on
A10G
Update app.py
Browse files
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=
|
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]) >
|
189 |
-
img = resize_image(img,
|
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(
|