Artificial-superintelligence commited on
Commit
2a2db8b
·
verified ·
1 Parent(s): 40ffd8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -266,15 +266,15 @@ def main():
266
  with col2:
267
  generate_subtitles = st.checkbox("Generate Subtitles", value=True)
268
 
269
- if generate_subtitles:
270
- col3, col4 = st.columns(2)
271
- with col3:
272
- subtitle_size = st.slider("Subtitle Size", 16, 32, 24)
273
- with col4:
274
- subtitle_color = st.color_picker("Subtitle Color", "#FFFFFF")
275
 
276
- # Process video
277
- if st.button("Start Dubbing"):
 
 
 
278
  try:
279
  output_video_path = process_video(
280
  video_file.read(),
 
266
  with col2:
267
  generate_subtitles = st.checkbox("Generate Subtitles", value=True)
268
 
269
+ # Ensure subtitle size and color are always defined
270
+ subtitle_size = 24 # Default subtitle size
271
+ subtitle_color = 'white' # Default subtitle color
 
 
 
272
 
273
+ if generate_subtitles:
274
+ subtitle_size = st.slider("Subtitle Size", 10, 40, 24)
275
+ subtitle_color = st.color_picker("Subtitle Color", "#FFFFFF")
276
+
277
+ if st.button("Process Video"):
278
  try:
279
  output_video_path = process_video(
280
  video_file.read(),