rynmurdock commited on
Commit
d6f0e0b
1 Parent(s): 664e108

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -248,11 +248,13 @@ def background_next_image():
248
  print('all users have 8 or more rows left to rate')
249
 
250
  latest_user_id = rated_rows.iloc[-1]['latest_user_to_rate']
251
- #rated_rows = prevs_df[[i[1]['user:rating'].get(latest_user_id, None) is not None for i in prevs_df.iterrows()]]
252
- #while len(rated_rows) < 4:
253
- # rated_rows = prevs_df[[i[1]['user:rating'].get(latest_user_id, None) is not None for i in prevs_df.iterrows()]]
254
- # time.sleep(.01)
255
- # print('latest user has < 4 rated_rows')
 
 
256
 
257
  print(latest_user_id)
258
  embs, ys = pluck_embs_ys(latest_user_id)
 
248
  print('all users have 8 or more rows left to rate')
249
 
250
  latest_user_id = rated_rows.iloc[-1]['latest_user_to_rate']
251
+ rated_rows = prevs_df[[i[1]['user:rating'].get(latest_user_id, None) is not None for i in prevs_df.iterrows()]]
252
+ not_rated_rows = prevs_df[[i[1]['user:rating'].get(latest_user_id, None) is None for i in prevs_df.iterrows()]]
253
+ while len(rated_rows) < 4 or len(not_rated_rows) > 10:
254
+ rated_rows = prevs_df[[i[1]['user:rating'].get(latest_user_id, None) is not None for i in prevs_df.iterrows()]]
255
+ not_rated_rows = prevs_df[[i[1]['user:rating'].get(latest_user_id, None) is None for i in prevs_df.iterrows()]]
256
+ time.sleep(.01)
257
+ print('latest user has < 4 rated_rows')
258
 
259
  print(latest_user_id)
260
  embs, ys = pluck_embs_ys(latest_user_id)