simonduerr commited on
Commit
7ec4ca8
1 Parent(s): b42bc0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -18,6 +18,7 @@ import sys
18
  import plotly.graph_objects as go
19
  import torch
20
  import gc
 
21
  print('GPU available',torch.cuda.is_available())
22
  print('__CUDA Device Name:',torch.cuda.get_device_name(0))
23
  print(os.getcwd())
@@ -97,6 +98,8 @@ def run_protgpt2(startsequence, length, repetitionPenalty, top_k_poolsize, max_s
97
  del protgpt2
98
  gc.collect()
99
  torch.cuda.empty_cache()
 
 
100
  print(gpu_usage())
101
  return sequences
102
 
 
18
  import plotly.graph_objects as go
19
  import torch
20
  import gc
21
+ from numba import cuda
22
  print('GPU available',torch.cuda.is_available())
23
  print('__CUDA Device Name:',torch.cuda.get_device_name(0))
24
  print(os.getcwd())
 
98
  del protgpt2
99
  gc.collect()
100
  torch.cuda.empty_cache()
101
+ device = cuda.get_current_device()
102
+ device.reset()
103
  print(gpu_usage())
104
  return sequences
105