all tensors moved to same device
Browse files
app.py
CHANGED
@@ -143,11 +143,11 @@ def predict(model_name, pairs_file, sequence_file, progress = gr.Progress()):
|
|
143 |
seq1 = str(seqs[prot1].seq)
|
144 |
seq2 = str(seqs[prot2].seq)
|
145 |
|
146 |
-
fold1 = foldseek_embeddings[prot1] if do_foldseek else None
|
147 |
-
fold2 = foldseek_embeddings[prot2] if do_foldseek else None
|
148 |
|
149 |
-
lm1 = lm_embed(seq1)
|
150 |
-
lm2 = lm_embed(seq2)
|
151 |
|
152 |
interaction = model.predict(lm1, lm2, embed_foldseek = do_foldseek, f0 = fold1, f1 = fold2).item()
|
153 |
|
|
|
143 |
seq1 = str(seqs[prot1].seq)
|
144 |
seq2 = str(seqs[prot2].seq)
|
145 |
|
146 |
+
fold1 = foldseek_embeddings[prot1].to(device) if do_foldseek else None
|
147 |
+
fold2 = foldseek_embeddings[prot2].to(device) if do_foldseek else None
|
148 |
|
149 |
+
lm1 = lm_embed(seq1).to(device)
|
150 |
+
lm2 = lm_embed(seq2).to(device)
|
151 |
|
152 |
interaction = model.predict(lm1, lm2, embed_foldseek = do_foldseek, f0 = fold1, f1 = fold2).item()
|
153 |
|