Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -306,7 +306,7 @@ def speech_to_text(video_file_path, selected_source_lang, whisper_model, min_num
|
|
306 |
save_path = "output/transcript_result.csv"
|
307 |
df_results = pd.DataFrame(objects)
|
308 |
df_results.to_csv(save_path)
|
309 |
-
return df_results, system_info,
|
310 |
|
311 |
except Exception as e:
|
312 |
raise RuntimeError("Error Running inference with local model", e)
|
@@ -320,8 +320,8 @@ df_init = pd.DataFrame(columns=['Start', 'End', 'Speaker', 'Text'])
|
|
320 |
memory = psutil.virtual_memory()
|
321 |
selected_source_lang = gr.Dropdown(choices=source_language_list, type="value", value="en", label="Spoken language in video", interactive=True)
|
322 |
selected_whisper_model = gr.Dropdown(choices=whisper_models, type="value", value="base", label="Selected Whisper model", interactive=True)
|
323 |
-
input_min_number_speakers = gr.Number(precision=0, value=2, label="Select
|
324 |
-
input_max_number_speakers = gr.Number(precision=0, value=2, label="Select
|
325 |
system_info = gr.Markdown(f"*Memory: {memory.total / (1024 * 1024 * 1024):.2f}GB, used: {memory.percent}%, available: {memory.available / (1024 * 1024 * 1024):.2f}GB*")
|
326 |
download_transcript = gr.File(label="Download transcript")
|
327 |
transcription_df = gr.DataFrame(value=df_init,label="Transcription dataframe", row_count=(0, "dynamic"), max_rows = 10, wrap=True, overflow_row_behaviour='paginate')
|
|
|
306 |
save_path = "output/transcript_result.csv"
|
307 |
df_results = pd.DataFrame(objects)
|
308 |
df_results.to_csv(save_path)
|
309 |
+
return df_results, system_info, save_path
|
310 |
|
311 |
except Exception as e:
|
312 |
raise RuntimeError("Error Running inference with local model", e)
|
|
|
320 |
memory = psutil.virtual_memory()
|
321 |
selected_source_lang = gr.Dropdown(choices=source_language_list, type="value", value="en", label="Spoken language in video", interactive=True)
|
322 |
selected_whisper_model = gr.Dropdown(choices=whisper_models, type="value", value="base", label="Selected Whisper model", interactive=True)
|
323 |
+
input_min_number_speakers = gr.Number(precision=0, value=2, label="Select minimum number of speakers", interactive=True)
|
324 |
+
input_max_number_speakers = gr.Number(precision=0, value=2, label="Select maximum number of speakers", interactive=True)
|
325 |
system_info = gr.Markdown(f"*Memory: {memory.total / (1024 * 1024 * 1024):.2f}GB, used: {memory.percent}%, available: {memory.available / (1024 * 1024 * 1024):.2f}GB*")
|
326 |
download_transcript = gr.File(label="Download transcript")
|
327 |
transcription_df = gr.DataFrame(value=df_init,label="Transcription dataframe", row_count=(0, "dynamic"), max_rows = 10, wrap=True, overflow_row_behaviour='paginate')
|