Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -347,7 +347,7 @@ df_init = pd.DataFrame(columns=['Start', 'End', 'Speaker', 'Text'])
|
|
347 |
memory = psutil.virtual_memory()
|
348 |
selected_source_lang = gr.Dropdown(choices=source_language_list, type="value", value="en", label="Выбрать язык", interactive=True)
|
349 |
selected_whisper_model = gr.Dropdown(choices=whisper_models, type="value", value="base", label="Выбрать размер модели", interactive=True)
|
350 |
-
number_speakers = gr.Number(precision=0, value=0, label="Введите колличество спикеров.
|
351 |
system_info = gr.Markdown(f"*Memory: {memory.total / (1024 * 1024 * 1024):.2f}GB, used: {memory.percent}%, available: {memory.available / (1024 * 1024 * 1024):.2f}GB*")
|
352 |
download_transcript = gr.File(label="Download transcript")
|
353 |
transcription_df = gr.DataFrame(value=df_init,label="Transcription dataframe", row_count=(0, "dynamic"), max_rows = 10, wrap=True, overflow_row_behaviour='paginate')
|
@@ -385,7 +385,7 @@ with demo:
|
|
385 |
with gr.Row():
|
386 |
with gr.Column():
|
387 |
youtube_url_in.render()
|
388 |
-
download_youtube_btn = gr.Button("
|
389 |
download_youtube_btn.click(get_youtube, [youtube_url_in], [
|
390 |
video_in])
|
391 |
print(video_in)
|
@@ -401,7 +401,7 @@ with demo:
|
|
401 |
selected_source_lang.render()
|
402 |
selected_whisper_model.render()
|
403 |
number_speakers.render()
|
404 |
-
transcribe_btn = gr.Button("
|
405 |
transcribe_btn.click(speech_to_text,
|
406 |
[video_in, selected_source_lang, selected_whisper_model, number_speakers],
|
407 |
[transcription_df, system_info, download_transcript]
|
|
|
347 |
memory = psutil.virtual_memory()
|
348 |
selected_source_lang = gr.Dropdown(choices=source_language_list, type="value", value="en", label="Выбрать язык", interactive=True)
|
349 |
selected_whisper_model = gr.Dropdown(choices=whisper_models, type="value", value="base", label="Выбрать размер модели", interactive=True)
|
350 |
+
number_speakers = gr.Number(precision=0, value=0, label="Введите колличество спикеров.", interactive=True)
|
351 |
system_info = gr.Markdown(f"*Memory: {memory.total / (1024 * 1024 * 1024):.2f}GB, used: {memory.percent}%, available: {memory.available / (1024 * 1024 * 1024):.2f}GB*")
|
352 |
download_transcript = gr.File(label="Download transcript")
|
353 |
transcription_df = gr.DataFrame(value=df_init,label="Transcription dataframe", row_count=(0, "dynamic"), max_rows = 10, wrap=True, overflow_row_behaviour='paginate')
|
|
|
385 |
with gr.Row():
|
386 |
with gr.Column():
|
387 |
youtube_url_in.render()
|
388 |
+
download_youtube_btn = gr.Button("Загрузить видео с ютуб")
|
389 |
download_youtube_btn.click(get_youtube, [youtube_url_in], [
|
390 |
video_in])
|
391 |
print(video_in)
|
|
|
401 |
selected_source_lang.render()
|
402 |
selected_whisper_model.render()
|
403 |
number_speakers.render()
|
404 |
+
transcribe_btn = gr.Button("Транскрипции аудио и разделение")
|
405 |
transcribe_btn.click(speech_to_text,
|
406 |
[video_in, selected_source_lang, selected_whisper_model, number_speakers],
|
407 |
[transcription_df, system_info, download_transcript]
|