Spaces:
Running
on
Zero
Running
on
Zero
viklofg
commited on
Commit
·
97c2382
1
Parent(s):
6829cf5
Update image upload
Browse files- Use default number of columns (which makes the uploaded images larger)
- Don't set the height, let the component grow as necessary
- app/tabs/submit.py +1 -4
app/tabs/submit.py
CHANGED
|
@@ -168,10 +168,7 @@ with gr.Blocks() as submit:
|
|
| 168 |
file_types=["image"],
|
| 169 |
label="Upload the images you want to transcribe",
|
| 170 |
interactive=True,
|
| 171 |
-
height=400,
|
| 172 |
object_fit="cover",
|
| 173 |
-
columns=5,
|
| 174 |
-
# preview=True,
|
| 175 |
)
|
| 176 |
|
| 177 |
with gr.Column(scale=1):
|
|
@@ -193,7 +190,7 @@ with gr.Blocks() as submit:
|
|
| 193 |
outputs=[batch_image_gallery],
|
| 194 |
)
|
| 195 |
def validate_images(images):
|
| 196 |
-
if len(images) >
|
| 197 |
gr.Warning(f"Maximum images you can upload is set to: {MAX_IMAGES}")
|
| 198 |
return gr.update(value=None)
|
| 199 |
return images
|
|
|
|
| 168 |
file_types=["image"],
|
| 169 |
label="Upload the images you want to transcribe",
|
| 170 |
interactive=True,
|
|
|
|
| 171 |
object_fit="cover",
|
|
|
|
|
|
|
| 172 |
)
|
| 173 |
|
| 174 |
with gr.Column(scale=1):
|
|
|
|
| 190 |
outputs=[batch_image_gallery],
|
| 191 |
)
|
| 192 |
def validate_images(images):
|
| 193 |
+
if len(images) > MAX_IMAGES:
|
| 194 |
gr.Warning(f"Maximum images you can upload is set to: {MAX_IMAGES}")
|
| 195 |
return gr.update(value=None)
|
| 196 |
return images
|