bat-6 commited on
Commit
eb029d7
·
1 Parent(s): 6459fd1
api/services.py CHANGED
@@ -51,7 +51,7 @@ def analyze_project(
51
 
52
  for _, row in results.iterrows():
53
  orig_score = round(float(row.get("originality_score", 0)), 2)
54
- sim_percent = round(100.0 - orig_score, 2)
55
 
56
  top_projects.append({
57
  "project_title": row.get("project_title", ""),
 
51
 
52
  for _, row in results.iterrows():
53
  orig_score = round(float(row.get("originality_score", 0)), 2)
54
+ sim_percent = round(float(row.get("hybrid_score", 0)) * 100, 2)
55
 
56
  top_projects.append({
57
  "project_title": row.get("project_title", ""),
src/similarity_model/hybrid_ranker.py CHANGED
@@ -217,9 +217,10 @@ def compare_single_candidate(
217
  unique_query_count=unique_query_count
218
  )
219
 
220
- originality_score = round(
221
- (1.0 - base_similarity) * 100,
222
- 2
 
223
  )
224
 
225
  hybrid_score = base_similarity
 
217
  unique_query_count=unique_query_count
218
  )
219
 
220
+ originality_score = compute_originality(
221
+ hybrid_score=base_similarity,
222
+ unique_query_features=unique_query_count,
223
+ total_query_features=total_query_features
224
  )
225
 
226
  hybrid_score = base_similarity