Spaces:
Sleeping
Sleeping
Update tasks/audio.py
Browse files- tasks/audio.py +1 -1
tasks/audio.py
CHANGED
|
@@ -94,7 +94,7 @@ async def evaluate_audio(request: AudioEvaluationRequest):
|
|
| 94 |
model = BlazeFaceModel(input_channels=1, label_count=model_settings['label_count'], use_double_block=False, activation='relu', use_optional_block=False)
|
| 95 |
|
| 96 |
|
| 97 |
-
model.load_state_dict(torch.load("./best_blazeface_model.pth", map_location=torch.device('cpu')))
|
| 98 |
|
| 99 |
model = torch.quantization.quantize_dynamic(model, {torch.nn.Linear}, dtype=torch.qint8)
|
| 100 |
|
|
|
|
| 94 |
model = BlazeFaceModel(input_channels=1, label_count=model_settings['label_count'], use_double_block=False, activation='relu', use_optional_block=False)
|
| 95 |
|
| 96 |
|
| 97 |
+
model.load_state_dict(torch.load("./best_blazeface_model.pth", map_location=torch.device('cpu'), weights_only=True))
|
| 98 |
|
| 99 |
model = torch.quantization.quantize_dynamic(model, {torch.nn.Linear}, dtype=torch.qint8)
|
| 100 |
|