Spaces:
Sleeping
Sleeping
kz209
commited on
Commit
·
107fbeb
1
Parent(s):
5275a8d
update
Browse files
pages/summarization_playground.py
CHANGED
@@ -36,7 +36,7 @@ def generate_answer(sources, model, model_name, prompt):
|
|
36 |
global __model_on_gpu__
|
37 |
|
38 |
if __model_on_gpu__ != model_name:
|
39 |
-
if
|
40 |
del model[__model_on_gpu__]
|
41 |
gc.collect()
|
42 |
torch.cuda.empty_cache()
|
|
|
36 |
global __model_on_gpu__
|
37 |
|
38 |
if __model_on_gpu__ != model_name:
|
39 |
+
if __model_on_gpu__:
|
40 |
del model[__model_on_gpu__]
|
41 |
gc.collect()
|
42 |
torch.cuda.empty_cache()
|