Spaces:
Sleeping
Sleeping
jonathanjordan21
commited on
Update app.py
Browse files
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 |
-
|
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 |
|