Update app.py
Browse files
app.py
CHANGED
@@ -220,7 +220,7 @@ def translate_transcriptions(df, selected_translation_lang_2):
|
|
220 |
|
221 |
print("translations done")
|
222 |
|
223 |
-
return
|
224 |
|
225 |
|
226 |
def create_srt_and_burn(df, video_in):
|
@@ -284,14 +284,13 @@ video_out = gr.Video(label="Video Out", mirror_webcam=False)
|
|
284 |
|
285 |
|
286 |
df_init = pd.DataFrame(columns=['start','end','text'])
|
287 |
-
df_init_2 = pd.DataFrame(columns=['start','end','text','translation'])
|
288 |
|
289 |
selected_source_lang = gr.Dropdown(choices=source_language_list, type="value", value="Let the model analyze", label="Spoken language in video", interactive=True)
|
290 |
selected_translation_lang_2 = gr.Dropdown(choices=translation_models_list, type="value", value="English", label="In which language you want the transcriptions?", interactive=True)
|
291 |
selected_whisper_model = gr.Dropdown(choices=whisper_models, type="value", value="base", label="Selected Whisper model", interactive=True)
|
292 |
|
293 |
transcription_df = gr.DataFrame(value=df_init,label="Transcription dataframe", row_count=(0, "dynamic"), max_rows = 10, wrap=True, overflow_row_behaviour='paginate')
|
294 |
-
transcription_and_translation_df = gr.DataFrame(value=
|
295 |
|
296 |
|
297 |
demo = gr.Blocks(css='''
|
|
|
220 |
|
221 |
print("translations done")
|
222 |
|
223 |
+
return df
|
224 |
|
225 |
|
226 |
def create_srt_and_burn(df, video_in):
|
|
|
284 |
|
285 |
|
286 |
df_init = pd.DataFrame(columns=['start','end','text'])
|
|
|
287 |
|
288 |
selected_source_lang = gr.Dropdown(choices=source_language_list, type="value", value="Let the model analyze", label="Spoken language in video", interactive=True)
|
289 |
selected_translation_lang_2 = gr.Dropdown(choices=translation_models_list, type="value", value="English", label="In which language you want the transcriptions?", interactive=True)
|
290 |
selected_whisper_model = gr.Dropdown(choices=whisper_models, type="value", value="base", label="Selected Whisper model", interactive=True)
|
291 |
|
292 |
transcription_df = gr.DataFrame(value=df_init,label="Transcription dataframe", row_count=(0, "dynamic"), max_rows = 10, wrap=True, overflow_row_behaviour='paginate')
|
293 |
+
transcription_and_translation_df = gr.DataFrame(value=df_init,label="Transcription and translation dataframe", max_rows = 10, wrap=True, overflow_row_behaviour='paginate')
|
294 |
|
295 |
|
296 |
demo = gr.Blocks(css='''
|