jonathanjordan21 commited on
Commit
3540a65
·
verified ·
1 Parent(s): 43f0862

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -605,8 +605,8 @@ def reload(chosen_model_id):
605
  model = SentenceTransformer(chosen_model_id, trust_remote_code=True)
606
  model_id = chosen_model_id
607
  # codes_emb = model.encode([x[6:] for x in codes])
608
- # codes_emb = model.encode([x["examples"] for x in examples])#.mean(axis=1)
609
- codes_emb = np.mean([model.encode(x["examples"]) for x in examples], axis=1)
610
  return f"Model {chosen_model_id} has been succesfully loaded!"
611
  return f"Model {chosen_model_id} is ready!"
612
 
 
605
  model = SentenceTransformer(chosen_model_id, trust_remote_code=True)
606
  model_id = chosen_model_id
607
  # codes_emb = model.encode([x[6:] for x in codes])
608
+ codes_emb = model.encode([x["examples"] for x in examples])#.mean(axis=1)
609
+ # codes_emb = np.mean([model.encode(x["examples"]) for x in examples], axis=1)
610
  return f"Model {chosen_model_id} has been succesfully loaded!"
611
  return f"Model {chosen_model_id} is ready!"
612