Commit ·
7bcdc7e
1
Parent(s): 5863cc6
Set dummy value for second output
Browse files33 unmodified lines3435363738395 unmodified lines45464748495051525354555657585933 unmodified linesdef transcribe(inputs, task, return_timestamps, language):print(f"Input type: {type(inputs)}")try:if inputs is None:5 unmodified linesresult = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task, "language": f"<|{language_code}|>"}, return_timestamps=return_timestamps)if return_timestamps:return chunks_to_srt(result['chunks'])else:return result['text']except Exception as e:print(f"Error - {e}")return e# def convert_audio(audio_input):33 unmodified lines34353637383940415 unmodified lines47484950515253545556575859606133 unmodified linesdef transcribe(inputs, task, return_timestamps, language):placeholder = 'Placeholder'print(f"Input type: {type(inputs)}")try:if inputs is None:5 unmodified linesresult = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task, "language": f"<|{language_code}|>"}, return_timestamps=return_timestamps)if return_timestamps:return chunks_to_srt(result['chunks']), placeholderelse:return result['text'], placeholderexcept Exception as e:print(f"Error - {e}")return e, placeholder# def convert_audio(audio_input):
app.py+5-3