Spaces:
Sleeping
Sleeping
AyoubChLin
commited on
Commit
•
6b54693
1
Parent(s):
8fe1189
[FIX]
Browse files
app.py
CHANGED
@@ -35,10 +35,16 @@ def main():
|
|
35 |
st.subheader("Search Results:")
|
36 |
logging.info("result :")
|
37 |
logging.info(results)
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
-
st.write(f"Document ID: {
|
41 |
-
st.write(f"Text: {
|
|
|
42 |
st.markdown("---")
|
43 |
|
44 |
if __name__ == "__main__":
|
|
|
35 |
st.subheader("Search Results:")
|
36 |
logging.info("result :")
|
37 |
logging.info(results)
|
38 |
+
ids = results['ids']
|
39 |
+
distances = results['distances']
|
40 |
+
metadatas = results['metadatas']
|
41 |
+
documents = results['documents']
|
42 |
+
|
43 |
+
for index, id in enumerate(ids):
|
44 |
|
45 |
+
st.write(f"Document ID: {id}, Metadata: {metadatas[index]}")
|
46 |
+
st.write(f"Text: {documents[index]}")
|
47 |
+
st.write(f"distance: {distances[index]}")
|
48 |
st.markdown("---")
|
49 |
|
50 |
if __name__ == "__main__":
|