AyoubChLin commited on
Commit
6b54693
1 Parent(s): 8fe1189
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -35,10 +35,16 @@ def main():
35
  st.subheader("Search Results:")
36
  logging.info("result :")
37
  logging.info(results)
38
- for result in results:
 
 
 
 
 
39
 
40
- st.write(f"Document ID: {result['id']}, Metadata: {result['metadata']}")
41
- st.write(f"Text: {result['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__":