jonathanjordan21 commited on
Commit
8cfda86
·
verified ·
1 Parent(s): e9f2c38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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