Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -87,21 +87,23 @@ import streamlit as st
|
|
87 |
from streamlit_chromadb_connection.chromadb_connection import ChromadbConnection
|
88 |
|
89 |
configuration = {
|
90 |
-
"client": "
|
91 |
-
"
|
|
|
92 |
}
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
conn = st.connection("chromadb",
|
97 |
type=ChromadbConnection,
|
98 |
**configuration)
|
99 |
-
documents_collection_df = conn.get_collection_data(collection_name)
|
100 |
-
st.dataframe(documents_collection_df)
|
101 |
-
|
102 |
|
|
|
103 |
|
|
|
|
|
|
|
104 |
|
|
|
|
|
105 |
|
106 |
|
107 |
|
|
|
87 |
from streamlit_chromadb_connection.chromadb_connection import ChromadbConnection
|
88 |
|
89 |
configuration = {
|
90 |
+
"client": "HttpClient",
|
91 |
+
"host": "localhost",
|
92 |
+
"port": 8000,
|
93 |
}
|
94 |
|
95 |
+
conn = st.connection(name="http_connection",
|
|
|
|
|
96 |
type=ChromadbConnection,
|
97 |
**configuration)
|
|
|
|
|
|
|
98 |
|
99 |
+
collection_name = "documents_collection"
|
100 |
|
101 |
+
embedding_function_name = "DefaultEmbedding"
|
102 |
+
conn.create_collection(collection_name=collection_name,
|
103 |
+
embedding_function_name=embedding_function_name)
|
104 |
|
105 |
+
collection_name = "documents_collection"
|
106 |
+
conn.get_collection_data(collection_name=collection_name)
|
107 |
|
108 |
|
109 |
|