thinh111 commited on
Commit
28422eb
β€’
1 Parent(s): 147ad2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1,5 +1,8 @@
1
- import os
2
- os.system('export CUDA_VISIBLE_DEVICES=""')
 
 
 
3
 
4
  import subprocess
5
  import sys
 
1
+ import torch
2
+ if torch.cuda.is_available():
3
+ torch.cuda.set_device(torch.device('cpu'))
4
+ else:
5
+ torch.device('cpu')
6
 
7
  import subprocess
8
  import sys