qqwjq1981 commited on
Commit
b31c13c
·
verified ·
1 Parent(s): 99fac43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -190,7 +190,7 @@ def translate_text(transcription_json, source_language, target_language):
190
  # Return the translated timestamps as a JSON string
191
  return translated_json
192
 
193
- def update_translations(file, edited_table):
194
  """
195
  Update the translations based on user edits in the Gradio Dataframe.
196
  """
@@ -212,7 +212,7 @@ def update_translations(file, edited_table):
212
  ]
213
 
214
  # Call the function to process the video with updated translations
215
- add_transcript_voiceover(file.name, updated_translations, output_video_path)
216
 
217
  # Calculate elapsed time
218
  elapsed_time = time.time() - start_time
 
190
  # Return the translated timestamps as a JSON string
191
  return translated_json
192
 
193
+ def update_translations(file, edited_table, mode):
194
  """
195
  Update the translations based on user edits in the Gradio Dataframe.
196
  """
 
212
  ]
213
 
214
  # Call the function to process the video with updated translations
215
+ add_transcript_voiceover(file.name, updated_translations, output_video_path, mode=="Transcription with Voiceover")
216
 
217
  # Calculate elapsed time
218
  elapsed_time = time.time() - start_time