Spaces:
Sleeping
Sleeping
Update pages/03_🚀_Find_my_show_(FAISS).py
Browse files
pages/03_🚀_Find_my_show_(FAISS).py
CHANGED
@@ -3,6 +3,7 @@ import importlib.util
|
|
3 |
import torch
|
4 |
import streamlit as st
|
5 |
import pandas as pd
|
|
|
6 |
from PIL import Image
|
7 |
|
8 |
|
@@ -130,7 +131,12 @@ else:
|
|
130 |
|
131 |
if st.button("Найти сериалы по запросу") and len(df) > 0:
|
132 |
|
|
|
133 |
output_faiss = FAISS_inference(search_table, user_request_emb, top_n)
|
|
|
|
|
|
|
|
|
134 |
|
135 |
# top_n = 5 # мин 1 макс 10
|
136 |
res = output_faiss()
|
|
|
3 |
import torch
|
4 |
import streamlit as st
|
5 |
import pandas as pd
|
6 |
+
import time
|
7 |
from PIL import Image
|
8 |
|
9 |
|
|
|
131 |
|
132 |
if st.button("Найти сериалы по запросу") and len(df) > 0:
|
133 |
|
134 |
+
start_time = time.time()
|
135 |
output_faiss = FAISS_inference(search_table, user_request_emb, top_n)
|
136 |
+
end_time = time.time()
|
137 |
+
elapsed_time = end_time - start_time
|
138 |
+
|
139 |
+
st.info(f"Время поиска составило: {elapsed_time:.4f} sec.")
|
140 |
|
141 |
# top_n = 5 # мин 1 макс 10
|
142 |
res = output_faiss()
|