mohbay commited on
Commit
b1bede2
·
verified ·
1 Parent(s): 61a6c42

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -83,12 +83,12 @@ def predict(text):
83
  if len(query_words) <= 2:
84
  # Short queries: prioritize exact word matches
85
  weight = 0.6
86
- elif len(query_words) <= 5:
87
  # Medium queries: balanced
88
- weight = 0.4
89
  else:
90
  # Long queries: prioritize semantic similarity
91
- weight = 0.25
92
 
93
  # Collect top1 with better scoring
94
  combined1 = []
 
83
  if len(query_words) <= 2:
84
  # Short queries: prioritize exact word matches
85
  weight = 0.6
86
+ elif len(query_words) <= 8:
87
  # Medium queries: balanced
88
+ weight = 0.5
89
  else:
90
  # Long queries: prioritize semantic similarity
91
+ weight = 0.3
92
 
93
  # Collect top1 with better scoring
94
  combined1 = []