Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ sentence_embed = pd.read_csv('Reference_file.csv')
|
|
15 |
|
16 |
# Define the backend function
|
17 |
def mapping_code(user_input):
|
18 |
-
emb1 = model.encode(user_input
|
19 |
similarities = []
|
20 |
for sentence in sentence_embed['embeds']:
|
21 |
similarity = util.cos_sim(sentence, emb1)
|
|
|
15 |
|
16 |
# Define the backend function
|
17 |
def mapping_code(user_input):
|
18 |
+
emb1 = model.encode(user_input, convert_to_tensor=True)
|
19 |
similarities = []
|
20 |
for sentence in sentence_embed['embeds']:
|
21 |
similarity = util.cos_sim(sentence, emb1)
|