Update app.py
Browse files
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
|