Spaces:
Sleeping
Sleeping
Update pages/02_📺_Find_my_show.py
Browse files
pages/02_📺_Find_my_show.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 |
# Формируем абсолютный путь до файла functions.py
|
@@ -121,7 +122,12 @@ else:
|
|
121 |
|
122 |
if st.button("Найти сериалы по запросу") and len(df) > 0:
|
123 |
|
|
|
124 |
output = RecSys(search_table, user_request, model)
|
|
|
|
|
|
|
|
|
125 |
|
126 |
# top_n = 5 # мин 1 макс 10
|
127 |
res = output().head(top_n)
|
|
|
3 |
import torch
|
4 |
import streamlit as st
|
5 |
import pandas as pd
|
6 |
+
import time
|
7 |
from PIL import Image
|
8 |
|
9 |
# Формируем абсолютный путь до файла functions.py
|
|
|
122 |
|
123 |
if st.button("Найти сериалы по запросу") and len(df) > 0:
|
124 |
|
125 |
+
start_time = time.time()
|
126 |
output = RecSys(search_table, user_request, model)
|
127 |
+
end_time = time.time()
|
128 |
+
elapsed_time = end_time - start_time
|
129 |
+
|
130 |
+
st.info(f"Время поиска составило: {elapsed_time:.4f} sec.")
|
131 |
|
132 |
# top_n = 5 # мин 1 макс 10
|
133 |
res = output().head(top_n)
|