atrytone commited on
Commit
39dc65a
Β·
1 Parent(s): 7b3e2ee

Update app.py

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