Spaces:
Running
on
Zero
Running
on
Zero
Anton Bushuiev
commited on
Commit
·
5b962d1
1
Parent(s):
21677dc
detach predictions
Browse files
app.py
CHANGED
@@ -60,8 +60,13 @@ random.seed(0)
|
|
60 |
|
61 |
|
62 |
@spaces.GPU
|
63 |
-
def predict_ddg(
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
|
67 |
def process_inputs(inputs, temp_dir):
|
|
|
60 |
|
61 |
|
62 |
@spaces.GPU
|
63 |
+
def predict_ddg(models, ppi, muts, return_attn):
|
64 |
+
if return_attn:
|
65 |
+
ddg_pred, attns = predict_ddg_(models, ppi, muts, return_attn=return_attn)
|
66 |
+
return ddg_pred.detach().cpu(), attns.detach().cpu()
|
67 |
+
else:
|
68 |
+
ddg_pred = predict_ddg_(models, ppi, muts, return_attn=return_attn)
|
69 |
+
return ddg_pred.detach().cpu()
|
70 |
|
71 |
|
72 |
def process_inputs(inputs, temp_dir):
|