Update app.py
Browse files
app.py
CHANGED
@@ -121,10 +121,10 @@ async def on_chat_start():
|
|
121 |
| chat_prompt | chat_model
|
122 |
)
|
123 |
def measure_embedding_time(docs):
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
|
129 |
# Let the user know that the system is ready
|
130 |
msg.content = measure_embedding_time(docs)
|
|
|
121 |
| chat_prompt | chat_model
|
122 |
)
|
123 |
def measure_embedding_time(docs):
|
124 |
+
start_time = time.time()
|
125 |
+
vectorstore.add_documents(docs)
|
126 |
+
elapsed_time = time.time() - start_time
|
127 |
+
print(f"{str(docs)} took {elapsed_time:.2f} seconds")
|
128 |
|
129 |
# Let the user know that the system is ready
|
130 |
msg.content = measure_embedding_time(docs)
|