Spaces:
Running
on
Zero
Running
on
Zero
Getting image_flag error
Browse filesThis is just a guess of what you might want instead? Getting an error when there are no images.
- app_dialogue.py +4 -2
app_dialogue.py
CHANGED
@@ -257,8 +257,10 @@ def flag_dope(
|
|
257 |
if isinstance(ex[0], dict):
|
258 |
images.append(ex[0]["file"])
|
259 |
prev_ex_is_image = True
|
260 |
-
|
261 |
-
|
|
|
|
|
262 |
dope_dataset_writer.flag(
|
263 |
flag_data=[
|
264 |
model_selector,
|
|
|
257 |
if isinstance(ex[0], dict):
|
258 |
images.append(ex[0]["file"])
|
259 |
prev_ex_is_image = True
|
260 |
+
if len(images) > 0:
|
261 |
+
image_flag = images[0]
|
262 |
+
else:
|
263 |
+
image_flag = False
|
264 |
dope_dataset_writer.flag(
|
265 |
flag_data=[
|
266 |
model_selector,
|