Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -22,8 +22,6 @@ translate_token_id = all_special_ids[-6]
|
|
22 |
|
23 |
|
24 |
def transcribe(microphone, state, task="transcribe"):
|
25 |
-
if file is None:
|
26 |
-
return state
|
27 |
file = microphone
|
28 |
|
29 |
pipe.model.config.forced_decoder_ids = [[2, transcribe_token_id if task=="transcribe" else translate_token_id]]
|
|
|
22 |
|
23 |
|
24 |
def transcribe(microphone, state, task="transcribe"):
|
|
|
|
|
25 |
file = microphone
|
26 |
|
27 |
pipe.model.config.forced_decoder_ids = [[2, transcribe_token_id if task=="transcribe" else translate_token_id]]
|