Tonyivan commited on
Commit
4113730
·
verified ·
1 Parent(s): 65a2535

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -45,7 +45,7 @@ async def answer_question(request: AnswerQuestionRequest):
45
  corpus_embeddings = model.encode(request.context, convert_to_tensor=True)
46
  query_embeddings = model.encode(request.question, convert_to_tensor=True)
47
  hits = util.semantic_search(query_embeddings, corpus_embeddings)
48
- for hit in hits:
49
  if hit['score'] > .5:
50
  loc = hit['corpus_id']
51
  res_locs.append(request.locations[loc])
 
45
  corpus_embeddings = model.encode(request.context, convert_to_tensor=True)
46
  query_embeddings = model.encode(request.question, convert_to_tensor=True)
47
  hits = util.semantic_search(query_embeddings, corpus_embeddings)
48
+ for hit in hits[0]:
49
  if hit['score'] > .5:
50
  loc = hit['corpus_id']
51
  res_locs.append(request.locations[loc])