eagle0504 commited on
Commit
a43f4e7
·
1 Parent(s): 79b7ab6

spinner added

Browse files
Files changed (1) hide show
  1. app.py +7 -6
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
- L = len(dataset["train"]["questions"])
90
- collection.add(
91
- ids=[str(i) for i in range(0, L)], # IDs are just strings
92
- documents=dataset["train"]["questions"], # Enter questions here
93
- metadatas=[{"type": "support"} for _ in range(0, L)],
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