Spaces:
Sleeping
Sleeping
rynmurdock
commited on
Commit
·
9c7e8e1
1
Parent(s):
9fca74d
Update app.py
Browse files
app.py
CHANGED
@@ -345,8 +345,9 @@ def choose(img, choice, calibrate_prompts, user_id, request: gr.Request):
|
|
345 |
choice = 0
|
346 |
|
347 |
row_mask = [p.split('/')[-1] in img for p in prevs_df['paths'].to_list()]
|
348 |
-
prevs_df.loc[row_mask, 'user:rating'][0]
|
349 |
-
|
|
|
350 |
img, calibrate_prompts = next_image(calibrate_prompts, user_id)
|
351 |
return img, calibrate_prompts
|
352 |
|
|
|
345 |
choice = 0
|
346 |
|
347 |
row_mask = [p.split('/')[-1] in img for p in prevs_df['paths'].to_list()]
|
348 |
+
if len(prevs_df.loc[row_mask, 'user:rating'][0]) > 0:
|
349 |
+
prevs_df.loc[row_mask, 'user:rating'][0][user_id] = choice
|
350 |
+
prevs_df.loc[row_mask, 'latest_user_to_rate'] = [user_id]
|
351 |
img, calibrate_prompts = next_image(calibrate_prompts, user_id)
|
352 |
return img, calibrate_prompts
|
353 |
|