Spaces:
Sleeping
Sleeping
ElenaRyumina
commited on
Commit
β’
a45c62c
1
Parent(s):
21cb4dd
Update model.py
Browse files- app/model.py +1 -1
app/model.py
CHANGED
@@ -66,7 +66,7 @@ path_audio_model_2 = load_model(config_data.model_audio_url, config_data.model_a
|
|
66 |
audio_processor = AutoFeatureExtractor.from_pretrained(path_audio_model_1)
|
67 |
|
68 |
audio_model = ExprModelV3.from_pretrained(path_audio_model_1)
|
69 |
-
audio_model.load_state_dict(torch.load(path_audio_model_2)["model_state_dict"])
|
70 |
audio_model.to(device)
|
71 |
audio_model.eval()
|
72 |
audio_model(test_audio.to(device))
|
|
|
66 |
audio_processor = AutoFeatureExtractor.from_pretrained(path_audio_model_1)
|
67 |
|
68 |
audio_model = ExprModelV3.from_pretrained(path_audio_model_1)
|
69 |
+
audio_model.load_state_dict(torch.load(path_audio_model_2, map_location=torch.device(device))["model_state_dict"])
|
70 |
audio_model.to(device)
|
71 |
audio_model.eval()
|
72 |
audio_model(test_audio.to(device))
|