Spaces:
Running
Running
spinner added
Browse files
app.py
CHANGED
@@ -86,12 +86,13 @@ collection = client.create_collection(combined_string)
|
|
86 |
|
87 |
|
88 |
# Embed and store the first N supports for this demo
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
)
|
|
|
95 |
|
96 |
|
97 |
# React to user input
|
|
|
86 |
|
87 |
|
88 |
# Embed and store the first N supports for this demo
|
89 |
+
with st.spinner("Loading database, please be patient with us ... 🙏"):
|
90 |
+
L = len(dataset["train"]["questions"])
|
91 |
+
collection.add(
|
92 |
+
ids=[str(i) for i in range(0, L)], # IDs are just strings
|
93 |
+
documents=dataset["train"]["questions"], # Enter questions here
|
94 |
+
metadatas=[{"type": "support"} for _ in range(0, L)],
|
95 |
+
)
|
96 |
|
97 |
|
98 |
# React to user input
|