Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
added print logs
Browse files
RAG/rag_DocumentSearcher.py
CHANGED
|
@@ -20,7 +20,11 @@ def query_(awsauth,inputs, session_id,search_types):
|
|
| 20 |
question = inputs['query']
|
| 21 |
|
| 22 |
k=1
|
|
|
|
|
|
|
| 23 |
embedding = invoke_models.invoke_model_mm(question,"none")
|
|
|
|
|
|
|
| 24 |
|
| 25 |
query_mm = {
|
| 26 |
"size": k,
|
|
|
|
| 20 |
question = inputs['query']
|
| 21 |
|
| 22 |
k=1
|
| 23 |
+
start_time = time.time()
|
| 24 |
+
|
| 25 |
embedding = invoke_models.invoke_model_mm(question,"none")
|
| 26 |
+
|
| 27 |
+
print(f"embedding generation took {time.time() - start_time:.2f} seconds")
|
| 28 |
|
| 29 |
query_mm = {
|
| 30 |
"size": k,
|