Spaces:
Runtime error
Runtime error
simonduerr
commited on
Commit
·
99b4ce0
1
Parent(s):
7ec4ca8
Update app.py
Browse files
app.py
CHANGED
@@ -92,11 +92,9 @@ def run_protgpt2(startsequence, length, repetitionPenalty, top_k_poolsize, max_s
|
|
92 |
num_return_sequences=max_seqs,
|
93 |
eos_token_id=0,
|
94 |
)
|
|
|
95 |
print(gpu_usage())
|
96 |
-
print(sequences)
|
97 |
-
print(type(sequences))
|
98 |
del protgpt2
|
99 |
-
gc.collect()
|
100 |
torch.cuda.empty_cache()
|
101 |
device = cuda.get_current_device()
|
102 |
device.reset()
|
@@ -126,8 +124,10 @@ def run_alphafold(startsequence):
|
|
126 |
**mk_mock_template(query_sequence),
|
127 |
}
|
128 |
plddts = predict_structure("test", feature_dict, model_runners)
|
129 |
-
|
130 |
-
|
|
|
|
|
131 |
print(gpu_usage())
|
132 |
return plddts["model_1"]
|
133 |
|
|
|
92 |
num_return_sequences=max_seqs,
|
93 |
eos_token_id=0,
|
94 |
)
|
95 |
+
print("Cleaning up after protGPT2")
|
96 |
print(gpu_usage())
|
|
|
|
|
97 |
del protgpt2
|
|
|
98 |
torch.cuda.empty_cache()
|
99 |
device = cuda.get_current_device()
|
100 |
device.reset()
|
|
|
124 |
**mk_mock_template(query_sequence),
|
125 |
}
|
126 |
plddts = predict_structure("test", feature_dict, model_runners)
|
127 |
+
print("Cleaning up after AF2")
|
128 |
+
print(gpu_usage())
|
129 |
+
device = cuda.get_current_device()
|
130 |
+
device.reset()
|
131 |
print(gpu_usage())
|
132 |
return plddts["model_1"]
|
133 |
|