DexterSptizu
commited on
Commit
•
ddd1c57
1
Parent(s):
9c49efc
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ class ModelHandler:
|
|
13 |
def __init__(self):
|
14 |
self.current_model = None
|
15 |
self.current_tokenizer = None
|
16 |
-
self.device = "
|
17 |
|
18 |
def load_model(self, model_name):
|
19 |
try:
|
|
|
13 |
def __init__(self):
|
14 |
self.current_model = None
|
15 |
self.current_tokenizer = None
|
16 |
+
self.device = "cpu" if torch.cuda.is_available() else "cpu"
|
17 |
|
18 |
def load_model(self, model_name):
|
19 |
try:
|