rynmurdock commited on
Commit
6a97676
1 Parent(s): 2c9620a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -282,12 +282,12 @@ def background_next_image():
282
 
283
  def pluck_embs_ys(user_id):
284
  rated_rows = prevs_df[[i[1]['user:rating'].get(user_id, None) != None for i in prevs_df.iterrows()]]
285
- not_rated_rows = prevs_df[[i[1]['user:rating'].get(user_id, None) == None for i in prevs_df.iterrows()]]
286
- while len(not_rated_rows) == 0:
287
- not_rated_rows = prevs_df[[i[1]['user:rating'].get(user_id, None) == None for i in prevs_df.iterrows()]]
288
- rated_rows = prevs_df[[i[1]['user:rating'].get(user_id, None) != None for i in prevs_df.iterrows()]]
289
- time.sleep(.01)
290
- print('current user has 0 not_rated_rows')
291
 
292
  embs = rated_rows['embeddings'].to_list()
293
  ys = [i[user_id] for i in rated_rows['user:rating'].to_list()]
 
282
 
283
  def pluck_embs_ys(user_id):
284
  rated_rows = prevs_df[[i[1]['user:rating'].get(user_id, None) != None for i in prevs_df.iterrows()]]
285
+ #not_rated_rows = prevs_df[[i[1]['user:rating'].get(user_id, None) == None for i in prevs_df.iterrows()]]
286
+ #while len(not_rated_rows) == 0:
287
+ # not_rated_rows = prevs_df[[i[1]['user:rating'].get(user_id, None) == None for i in prevs_df.iterrows()]]
288
+ # rated_rows = prevs_df[[i[1]['user:rating'].get(user_id, None) != None for i in prevs_df.iterrows()]]
289
+ # time.sleep(.01)
290
+ # print('current user has 0 not_rated_rows')
291
 
292
  embs = rated_rows['embeddings'].to_list()
293
  ys = [i[user_id] for i in rated_rows['user:rating'].to_list()]