Spaces:
Sleeping
Sleeping
Reorder output columns
Browse files
app.py
CHANGED
@@ -31,6 +31,8 @@ def search_query(query, top_k=10):
|
|
31 |
|
32 |
results = conn.execute(sql_query).fetchdf()
|
33 |
results["#"] = list(range(1, len(results) + 1))
|
|
|
|
|
34 |
# results["relevance_score"] = [1 - d for d in distances]
|
35 |
|
36 |
return results
|
|
|
31 |
|
32 |
results = conn.execute(sql_query).fetchdf()
|
33 |
results["#"] = list(range(1, len(results) + 1))
|
34 |
+
new_order = ["#", "sõna", "definitsioon"]
|
35 |
+
results = results[new_order]
|
36 |
# results["relevance_score"] = [1 - d for d in distances]
|
37 |
|
38 |
return results
|