artificial-feelings
commited on
Commit
•
576bca9
1
Parent(s):
2074891
Upload handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -4,7 +4,7 @@ import torch
|
|
4 |
# set device
|
5 |
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
6 |
|
7 |
-
if
|
8 |
raise ValueError("need to run on GPU")
|
9 |
|
10 |
class EndpointHandler():
|
|
|
4 |
# set device
|
5 |
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
6 |
|
7 |
+
if DEVICE.type != 'cuda':
|
8 |
raise ValueError("need to run on GPU")
|
9 |
|
10 |
class EndpointHandler():
|