Konrad Wojtasik commited on
Commit
90405e2
1 Parent(s): ade42bf

Tensor to cpu

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -60,7 +60,7 @@ def bi_encode(bi_encoder_name,passages, dataset_name='scifact-pl'):
60
  name = 'mcontriever'
61
 
62
  corpus_embeddings_name = "-".join([name, dataset_name, "corpus"])
63
- corpus_embeddings = torch.load(corpus_embeddings_name)
64
 
65
 
66
  st.success(f"Embeddings computed. Shape: {corpus_embeddings.shape}")
 
60
  name = 'mcontriever'
61
 
62
  corpus_embeddings_name = "-".join([name, dataset_name, "corpus"])
63
+ corpus_embeddings = torch.load(corpus_embeddings_name, map_location=torch.device('cpu'))
64
 
65
 
66
  st.success(f"Embeddings computed. Shape: {corpus_embeddings.shape}")