sickcell commited on
Commit
cec10cb
1 Parent(s): c7bf51f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -69,7 +69,7 @@ def semantic_search(query, top_k=5):
69
  results = []
70
  for distance, idx in zip(distances[0], indices[0]):
71
  similarity_score = 1 - distance / 2 # 將距離轉換為相似度分數
72
- if similarity_score >= 0.45: # 只添加相似度大於等於0.45的結果
73
  results.append({
74
  'text': data[idx]['text'],
75
  'entities': data[idx]['entities'],
 
69
  results = []
70
  for distance, idx in zip(distances[0], indices[0]):
71
  similarity_score = 1 - distance / 2 # 將距離轉換為相似度分數
72
+ if similarity_score >= 0.1: # 只添加相似度大於等於0.45的結果
73
  results.append({
74
  'text': data[idx]['text'],
75
  'entities': data[idx]['entities'],