diff --git a/app.py b/app.py index 8eb177b..ece6acc 100644 --- a/app.py +++ b/app.py @@ -56,7 +56,7 @@ def change_model(current_size, size): @st.cache(allow_output_mutation=True) -def inferecence(loaded_model, uploaded_file, task): +def inferecence(_loaded_model, uploaded_file, task): with open(f"{save_dir}/input.mp4", "wb") as f: f.write(uploaded_file.read()) audio = ffmpeg.input(f"{save_dir}/input.mp4") @@ -64,14 +64,14 @@ def inferecence(loaded_model, uploaded_file, task): ffmpeg.run(audio, overwrite_output=True) if task == "Transcribe": options = dict(task="transcribe", best_of=5) - results = loaded_model.transcribe(f"{save_dir}/output.wav", **options) + results = _loaded_model.transcribe(f"{save_dir}/output.wav", **options) vtt = getSubs(results["segments"], "vtt", 80) srt = getSubs(results["segments"], "srt", 80) lang = results["language"] return results["text"], vtt, srt, lang elif task == "Translate": options = dict(task="translate", best_of=5) - results = loaded_model.transcribe(f"{save_dir}/output.wav", **options) + results = _loaded_model.transcribe(f"{save_dir}/output.wav", **options) vtt = getSubs(results["segments"], "vtt", 80) srt = getSubs(results["segments"], "srt", 80) lang = results["language"]