Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,8 +32,8 @@ def translate(audio):
|
|
| 32 |
generated_ids = asr_model.generate(inputs["input_features"],attention_mask=inputs["attention_mask"],
|
| 33 |
forced_bos_token_id=asr_processor.tokenizer.lang_code_to_id['it'],)
|
| 34 |
translation = asr_processor.batch_decode(generated_ids, skip_special_tokens=True)
|
| 35 |
-
_, parsedTranslation = translation[0].split(")", 1)
|
| 36 |
-
translation[0] = parsedTranslation
|
| 37 |
return translation
|
| 38 |
|
| 39 |
|
|
|
|
| 32 |
generated_ids = asr_model.generate(inputs["input_features"],attention_mask=inputs["attention_mask"],
|
| 33 |
forced_bos_token_id=asr_processor.tokenizer.lang_code_to_id['it'],)
|
| 34 |
translation = asr_processor.batch_decode(generated_ids, skip_special_tokens=True)
|
| 35 |
+
# _, parsedTranslation = translation[0].split(")", 1)
|
| 36 |
+
# translation[0] = parsedTranslation
|
| 37 |
return translation
|
| 38 |
|
| 39 |
|