Spaces:
Sleeping
Sleeping
Commit
·
da4f838
1
Parent(s):
556f1d5
show item id
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def build_qdrant_index(data):
|
|
44 |
descriptions = [f"{item['name']} - {item['description']}" for item in items]
|
45 |
names = [item["name"] for item in items]
|
46 |
metadata = [
|
47 |
-
{"name": item["name"]} # You can store more fields if you like
|
48 |
for item in items
|
49 |
]
|
50 |
|
@@ -294,8 +294,9 @@ def main():
|
|
294 |
st.markdown(f"### {method}")
|
295 |
for point in qdrant_result.points:
|
296 |
name = point.payload.get("name", "Unnamed")
|
|
|
297 |
score = round(point.score, 4) if point.score else "N/A"
|
298 |
-
st.write(f"- **{name}** (score={score})")
|
299 |
|
300 |
if __name__ == "__main__":
|
301 |
main()
|
|
|
44 |
descriptions = [f"{item['name']} - {item['description']}" for item in items]
|
45 |
names = [item["name"] for item in items]
|
46 |
metadata = [
|
47 |
+
{"name": item["name"],"item_id":item["id"]} # You can store more fields if you like
|
48 |
for item in items
|
49 |
]
|
50 |
|
|
|
294 |
st.markdown(f"### {method}")
|
295 |
for point in qdrant_result.points:
|
296 |
name = point.payload.get("name", "Unnamed")
|
297 |
+
item_id = point.payload.get("item_id", "")
|
298 |
score = round(point.score, 4) if point.score else "N/A"
|
299 |
+
st.write(f"- **{item_id}-{name}** (score={score})")
|
300 |
|
301 |
if __name__ == "__main__":
|
302 |
main()
|