Update app.py
Browse files
app.py
CHANGED
@@ -271,7 +271,7 @@ class Music2emo:
|
|
271 |
model = BTC_model(config=config.model).to(self.device)
|
272 |
|
273 |
if os.path.isfile(model_file):
|
274 |
-
checkpoint = torch.load(model_file)
|
275 |
mean = checkpoint['mean']
|
276 |
std = checkpoint['std']
|
277 |
model.load_state_dict(checkpoint['model'])
|
|
|
271 |
model = BTC_model(config=config.model).to(self.device)
|
272 |
|
273 |
if os.path.isfile(model_file):
|
274 |
+
checkpoint = torch.load(model_file, map_location=self.device)
|
275 |
mean = checkpoint['mean']
|
276 |
std = checkpoint['std']
|
277 |
model.load_state_dict(checkpoint['model'])
|