Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def translate_speech(audio_input):
|
|
21 |
input_dict = processor(audio_data, return_tensors="pt", padding=True)
|
22 |
|
23 |
# Use the model to get the logits
|
24 |
-
logits = model(input_dict.input_values.to("
|
25 |
|
26 |
# Get the predicted IDs
|
27 |
pred_ids = torch.argmax(logits, dim=-1)[0]
|
|
|
21 |
input_dict = processor(audio_data, return_tensors="pt", padding=True)
|
22 |
|
23 |
# Use the model to get the logits
|
24 |
+
logits = model(input_dict.input_values.to("cpu")).logits
|
25 |
|
26 |
# Get the predicted IDs
|
27 |
pred_ids = torch.argmax(logits, dim=-1)[0]
|