import gradio as gr from main_pipeline import main_pipeline from scipy.io.wavfile import write url = "https://t.me/diarizarion_bot" title = "Audio_denoise and speaker diarization.Faster inference tg_bot".format(url) example_list = [ ["dialog.mp3"] ] def app_pipeline(audio): audio_path = 'test.wav' write(audio_path, audio[0], audio[1]) denoised_audio_path, result_diarization = main_pipeline(audio_path) return result_diarization + [None] * (10 - len(result_diarization)) gr.Interface( app_pipeline, gr.Audio(type="numpy", label="Input"), [gr.Audio(visible=True) for i in range(10)], title=title, examples=example_list, cache_examples=False, ).launch(enable_queue=True)