Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -172,9 +172,13 @@ def search_memory():
|
|
| 172 |
#response = db.find(query, **search_req)
|
| 173 |
response = db.find(query)
|
| 174 |
print(response)
|
|
|
|
|
|
|
|
|
|
| 175 |
# 2. Refined Parsing (The Anti-Junk Filter)
|
| 176 |
clean_results = []
|
| 177 |
-
for hit in response:
|
|
|
|
| 178 |
# Filter low relevance
|
| 179 |
if hit.score < 0.65:
|
| 180 |
continue
|
|
|
|
| 172 |
#response = db.find(query, **search_req)
|
| 173 |
response = db.find(query)
|
| 174 |
print(response)
|
| 175 |
+
#{'query': 'car', 'hits': [], 'took_ms': 16, 'total_hits': 0, 'engine': 'tantivy', 'context': ''}
|
| 176 |
+
|
| 177 |
+
|
| 178 |
# 2. Refined Parsing (The Anti-Junk Filter)
|
| 179 |
clean_results = []
|
| 180 |
+
for hit in response['hits']:
|
| 181 |
+
print(hit)
|
| 182 |
# Filter low relevance
|
| 183 |
if hit.score < 0.65:
|
| 184 |
continue
|