Spaces:
Sleeping
Sleeping
jonathanjordan21
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -106,10 +106,12 @@ def respond(
|
|
106 |
global undetected
|
107 |
global model
|
108 |
global model_id
|
|
|
109 |
|
110 |
if chosen_model_id != model_id:
|
111 |
model = SentenceTransformer(chosen_model_id, trust_remote_code=True)
|
112 |
model_id = chosen_model_id
|
|
|
113 |
|
114 |
undetected_code = undetected[:3]
|
115 |
|
|
|
106 |
global undetected
|
107 |
global model
|
108 |
global model_id
|
109 |
+
global codes_emb
|
110 |
|
111 |
if chosen_model_id != model_id:
|
112 |
model = SentenceTransformer(chosen_model_id, trust_remote_code=True)
|
113 |
model_id = chosen_model_id
|
114 |
+
codes_emb = model.encode([x[6:] for x in codes])
|
115 |
|
116 |
undetected_code = undetected[:3]
|
117 |
|