Spaces:
Running
Running
Update app.py
Browse files
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) <=
|
| 87 |
# Medium queries: balanced
|
| 88 |
-
weight = 0.
|
| 89 |
else:
|
| 90 |
# Long queries: prioritize semantic similarity
|
| 91 |
-
weight = 0.
|
| 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 = []
|