Spaces:
Sleeping
Sleeping
Commit
·
76f99fa
1
Parent(s):
fbc8f33
updates
Browse files
app.py
CHANGED
|
@@ -149,6 +149,7 @@ def get_next_image(session_data):
|
|
| 149 |
|
| 150 |
# print("Available images:", available_images) # Debugging line
|
| 151 |
|
|
|
|
| 152 |
|
| 153 |
# Check if the user already has an image
|
| 154 |
if session_data["current_image"] is None and available_images:
|
|
@@ -201,9 +202,9 @@ def save_annotation(caption, session_data):
|
|
| 201 |
dataset.push_to_hub(dataset_name)
|
| 202 |
print("Pushed updated dataset")
|
| 203 |
|
| 204 |
-
# Clear user's current image if the validation image has been annotated twice
|
| 205 |
-
if (split == "train" and annotation_count > 1) or (split == "dev" and annotation_count > 2):
|
| 206 |
-
|
| 207 |
|
| 208 |
# Fetch the next image
|
| 209 |
next_image = get_next_image(session_data)
|
|
|
|
| 149 |
|
| 150 |
# print("Available images:", available_images) # Debugging line
|
| 151 |
|
| 152 |
+
random.shuffle(available_images)
|
| 153 |
|
| 154 |
# Check if the user already has an image
|
| 155 |
if session_data["current_image"] is None and available_images:
|
|
|
|
| 202 |
dataset.push_to_hub(dataset_name)
|
| 203 |
print("Pushed updated dataset")
|
| 204 |
|
| 205 |
+
# # Clear user's current image if the validation image has been annotated twice
|
| 206 |
+
# if (split == "train" and annotation_count > 1) or (split == "dev" and annotation_count > 2):
|
| 207 |
+
# session_data["current_image"] = None
|
| 208 |
|
| 209 |
# Fetch the next image
|
| 210 |
next_image = get_next_image(session_data)
|