Spaces:
Runtime error
Runtime error
ivan-savchuk
commited on
Commit
β’
050c0a6
1
Parent(s):
c0c87af
update without cross-encoder
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ class DocumentSearch:
|
|
44 |
# get scores by index
|
45 |
dists = [dist for dist in distances[0]]
|
46 |
|
47 |
-
return[{'doc': doc[0], 'url'
|
48 |
##### OLD VERSION WITH CROSS-ENCODER #####
|
49 |
# get answers by index
|
50 |
#answers = [self.docs[i] for i in indeces[0]]
|
|
|
44 |
# get scores by index
|
45 |
dists = [dist for dist in distances[0]]
|
46 |
|
47 |
+
return[{'doc': doc[0], 'url': doc[1], 'score': dist} for doc, dist in zip(docs, dists)]
|
48 |
##### OLD VERSION WITH CROSS-ENCODER #####
|
49 |
# get answers by index
|
50 |
#answers = [self.docs[i] for i in indeces[0]]
|