Spaces:
Build error
Build error
patrickvonplaten
commited on
Commit
•
958195e
1
Parent(s):
5ee0b21
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def transcribe(file, target_language):
|
|
25 |
|
26 |
input_values = process_audio_file(file)
|
27 |
|
28 |
-
sequences = model.generate(input_values, forced_bos_token_id=forced_bos_token_id)
|
29 |
|
30 |
transcription = tokenizer.batch_decode(sequences, skip_special_tokens=True)
|
31 |
return transcription[0]
|
|
|
25 |
|
26 |
input_values = process_audio_file(file)
|
27 |
|
28 |
+
sequences = model.generate(input_values, forced_bos_token_id=forced_bos_token_id, num_beams=1, max_length=30)
|
29 |
|
30 |
transcription = tokenizer.batch_decode(sequences, skip_special_tokens=True)
|
31 |
return transcription[0]
|