Spaces:
Sleeping

allbibek commited on
Commit
42c2e4e
·
verified ·
1 Parent(s): d7e5ee7

interpolar

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -197,8 +197,12 @@ def hybrid_search_no_gemini(query: str, match_count: int = 50):
197
 
198
  for c, s in zip(candidates, scores):
199
  c["rerank_score"] = float(s)
200
- # Ubah logit jadi probabilitas absolut (0 sampai 1)
201
- c["rerank_prob"] = apply_sigmoid(float(s))
 
 
 
 
202
 
203
  candidates = sorted(candidates, key=lambda x: x["rerank_prob"], reverse=True)
204
  return {"results": candidates[:10]}
 
197
 
198
  for c, s in zip(candidates, scores):
199
  c["rerank_score"] = float(s)
200
+ rerank_prob = apply_sigmoid(float(s))
201
+ c["rerank_prob"] = rerank_prob
202
+
203
+ db_sim = c.get("similarity", 0.0)
204
+
205
+ c["final_score"] = (0.6 * rerank_prob) + (0.4 * db_sim)
206
 
207
  candidates = sorted(candidates, key=lambda x: x["rerank_prob"], reverse=True)
208
  return {"results": candidates[:10]}