Spaces:
Sleeping
Sleeping
Update tasks/audio.py
Browse files- tasks/audio.py +1 -1
tasks/audio.py
CHANGED
|
@@ -100,7 +100,7 @@ async def evaluate_audio(request: AudioEvaluationRequest):
|
|
| 100 |
#--------------------------------------------------------------------------------------------
|
| 101 |
predictions = []
|
| 102 |
with torch.no_grad():
|
| 103 |
-
with autocast():
|
| 104 |
for data, target in test_loader:
|
| 105 |
outputs = scripted_model(data)
|
| 106 |
_, predicted = torch.max(outputs, 1)
|
|
|
|
| 100 |
#--------------------------------------------------------------------------------------------
|
| 101 |
predictions = []
|
| 102 |
with torch.no_grad():
|
| 103 |
+
with autocast(device_type='cpu'):
|
| 104 |
for data, target in test_loader:
|
| 105 |
outputs = scripted_model(data)
|
| 106 |
_, predicted = torch.max(outputs, 1)
|