Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def inference(query, k=30):
|
|
38 |
def normaliser(x): return round(1 - (x-min_score)/max_score, 3)
|
39 |
for i, match in enumerate(matches):
|
40 |
doc = match[0]
|
41 |
-
score = normaliser(round(match[1].item(), 3))
|
42 |
title = doc.metadata['title']
|
43 |
author = doc.metadata['authors'][0].title()
|
44 |
date = doc.metadata.get('date', 'None')
|
|
|
38 |
def normaliser(x): return round(1 - (x-min_score)/max_score, 3)
|
39 |
for i, match in enumerate(matches):
|
40 |
doc = match[0]
|
41 |
+
score = round(normaliser(round(match[1].item(), 3)),3)
|
42 |
title = doc.metadata['title']
|
43 |
author = doc.metadata['authors'][0].title()
|
44 |
date = doc.metadata.get('date', 'None')
|