Spaces:
Sleeping
Sleeping
Commit
·
da2b35e
1
Parent(s):
3c46d74
update map_location of model to cpu
Browse files
app.py
CHANGED
@@ -10,6 +10,8 @@ import matplotlib.pyplot as plt
|
|
10 |
import matplotlib.ticker as ticker
|
11 |
from huggingface_hub import HfApi
|
12 |
|
|
|
|
|
13 |
def load_checkpoint(filepath):
|
14 |
"""Builds PyTorch Model from saved model
|
15 |
Returns built model
|
|
|
10 |
import matplotlib.ticker as ticker
|
11 |
from huggingface_hub import HfApi
|
12 |
|
13 |
+
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
14 |
+
|
15 |
def load_checkpoint(filepath):
|
16 |
"""Builds PyTorch Model from saved model
|
17 |
Returns built model
|