Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit 038ff5c

Browse files
committed
Update txtai to 2.0.0 and fix breaking change
1 parent bd58faa commit 038ff5c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"html2text>=2020.1.16",
3232
"mdv>=1.7.4",
3333
"tqdm==4.48.0",
34-
"txtai>=1.2.0"
34+
"txtai>=2.0.0"
3535
],
3636
classifiers=[
3737
"License :: OSI Approved :: Apache Software License",

src/python/codequestion/evaluate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def test(args, embeddings):
211211
tokens2 = Tokenizer.tokenize(row[3])
212212

213213
if tokens1 and tokens2:
214-
score = embeddings.similarity(tokens1, [tokens2])[0]
214+
score = embeddings.similarity(tokens1, [tokens2])[0][1]
215215
scores.append(score)
216216

217217
# Ground truth score normalized between 0 - 1

0 commit comments

Comments
 (0)