Spaces:
Runtime error
Runtime error
Update stri.py
Browse files
stri.py
CHANGED
@@ -45,8 +45,15 @@ length = 512
|
|
45 |
query = st.text_input("Введите запрос")
|
46 |
|
47 |
if st.button('Сгенерировать'):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
#with open("book_embeddingsN.pkl", "rb") as f:
|
49 |
-
book_embeddings = torch.load("book_embeddingsN.pkl", map_location=torch.device('cpu'))
|
50 |
#
|
51 |
#book_embeddings = pickle.load(f)
|
52 |
|
|
|
45 |
query = st.text_input("Введите запрос")
|
46 |
|
47 |
if st.button('Сгенерировать'):
|
48 |
+
with open("book_embeddingsN.pkl", "rb") as f:
|
49 |
+
book_embeddings = pickle.load(f)
|
50 |
+
|
51 |
+
book_embeddings = torch.tensor(book_embeddings, device=torch.device('cpu'))
|
52 |
+
|
53 |
+
|
54 |
+
#if st.button('Сгенерировать'):
|
55 |
#with open("book_embeddingsN.pkl", "rb") as f:
|
56 |
+
#book_embeddings = torch.load("book_embeddingsN.pkl", map_location=torch.device('cpu'))
|
57 |
#
|
58 |
#book_embeddings = pickle.load(f)
|
59 |
|