Update app.py
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def add_transcript_to_video(video_path, translated_json, output_path):
|
|
102 |
# Ensure `entry` is a dictionary with keys "start", "end", and "translated"
|
103 |
if isinstance(entry, dict) and "translated" in entry:
|
104 |
txt_clip = TextClip(
|
105 |
-
entry["translated"], method='caption', color='white', bg_color='black', size=video.size
|
106 |
).set_start(entry["start"]).set_duration(entry["end"] - entry["start"]).set_position(('bottom')).set_opacity(0.7)
|
107 |
text_clips.append(txt_clip)
|
108 |
else:
|
|
|
102 |
# Ensure `entry` is a dictionary with keys "start", "end", and "translated"
|
103 |
if isinstance(entry, dict) and "translated" in entry:
|
104 |
txt_clip = TextClip(
|
105 |
+
text=entry["translated"], method='caption', color='white', bg_color='black', size=video.size
|
106 |
).set_start(entry["start"]).set_duration(entry["end"] - entry["start"]).set_position(('bottom')).set_opacity(0.7)
|
107 |
text_clips.append(txt_clip)
|
108 |
else:
|