Update app.py
Browse files
app.py
CHANGED
@@ -26,10 +26,10 @@ with col3:
|
|
26 |
|
27 |
if model_type == 'rubert-tiny2':
|
28 |
model = SentenceTransformer('cointegrated/rubert-tiny2')
|
29 |
-
emb = torch.load('resources/corpus_embeddings_rub.pth')
|
30 |
else:
|
31 |
model = SentenceTransformer('msmarco-MiniLM-L-12-v3')
|
32 |
-
emb = torch.load('resources/corpus_embeddings_ms.pth')
|
33 |
|
34 |
range_years = st.slider("В каком году вышел фильм?", min_value=df['year'].unique().min(),
|
35 |
max_value=df['year'].unique().max(),
|
|
|
26 |
|
27 |
if model_type == 'rubert-tiny2':
|
28 |
model = SentenceTransformer('cointegrated/rubert-tiny2')
|
29 |
+
emb = torch.load('resources/corpus_embeddings_rub.pth', map_location=torch.device('cpu'))
|
30 |
else:
|
31 |
model = SentenceTransformer('msmarco-MiniLM-L-12-v3')
|
32 |
+
emb = torch.load('resources/corpus_embeddings_ms.pth', map_location=torch.device('cpu'))
|
33 |
|
34 |
range_years = st.slider("В каком году вышел фильм?", min_value=df['year'].unique().min(),
|
35 |
max_value=df['year'].unique().max(),
|