Spaces:
Runtime error
Runtime error
Commit ·
b237d6f
1
Parent(s): 3b33d39
hope
Browse files
app.py
CHANGED
|
@@ -139,7 +139,7 @@ def main():
|
|
| 139 |
count = state if isinstance(state, int) else state.value
|
| 140 |
return f" Target image: **{class_names[count]}**"
|
| 141 |
|
| 142 |
-
def update_random_img_id(img_ids):
|
| 143 |
count = user_state if isinstance(user_state, int) else user_state.value
|
| 144 |
random_img_id = get_random_image_id(count, data_dir)
|
| 145 |
img_ids.append(random_img_id)
|
|
@@ -254,7 +254,7 @@ def main():
|
|
| 254 |
outputs=answers
|
| 255 |
).then(
|
| 256 |
update_random_img_id,
|
| 257 |
-
inputs=img_ids,
|
| 258 |
outputs=img_ids
|
| 259 |
).then(
|
| 260 |
update_img_label,
|
|
|
|
| 139 |
count = state if isinstance(state, int) else state.value
|
| 140 |
return f" Target image: **{class_names[count]}**"
|
| 141 |
|
| 142 |
+
def update_random_img_id(img_ids, user_state):
|
| 143 |
count = user_state if isinstance(user_state, int) else user_state.value
|
| 144 |
random_img_id = get_random_image_id(count, data_dir)
|
| 145 |
img_ids.append(random_img_id)
|
|
|
|
| 254 |
outputs=answers
|
| 255 |
).then(
|
| 256 |
update_random_img_id,
|
| 257 |
+
inputs=[img_ids, user_state],
|
| 258 |
outputs=img_ids
|
| 259 |
).then(
|
| 260 |
update_img_label,
|