awacke1 commited on
Commit
384eb2b
·
verified ·
1 Parent(s): 7a1eeb4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -21
app.py CHANGED
@@ -231,25 +231,26 @@ def get_marquee_settings():
231
 
232
  def update_marquee_settings_ui():
233
  """🖌 Add color pickers & sliders for marquee config in the sidebar."""
234
- st.sidebar.markdown("### 🎯 Marquee Settings")
235
- cols = st.sidebar.columns(2)
236
- with cols[0]:
237
- bg_color = st.color_picker("🎨 Background",
238
- st.session_state['marquee_settings']["background"],
239
- key="bg_color_picker")
240
- text_color = st.color_picker("✍️ Text",
241
- st.session_state['marquee_settings']["color"],
242
- key="text_color_picker")
243
- with cols[1]:
244
- font_size = st.slider("📏 Size", 10, 24, 14, key="font_size_slider")
245
- duration = st.slider("⏱️ Speed (secs)", 1, 20, 20, key="duration_slider")
246
-
247
- st.session_state['marquee_settings'].update({
248
- "background": bg_color,
249
- "color": text_color,
250
- "font-size": f"{font_size}px",
251
- "animationDuration": f"{duration}s"
252
- })
 
253
 
254
  def display_marquee(text, settings, key_suffix=""):
255
  """
@@ -926,9 +927,9 @@ def display_voice_tab():
926
 
927
  # Optionally, replace with your own local image or comment out
928
  try:
929
- st.sidebar.image('Group Picture - Voices.png', caption=caption_female + ' | ' + caption_male)
930
  except:
931
- st.sidebar.write('.')
932
 
933
  selected_voice = st.sidebar.selectbox(
934
  "👄 Select TTS Voice:",
 
231
 
232
  def update_marquee_settings_ui():
233
  """🖌 Add color pickers & sliders for marquee config in the sidebar."""
234
+ with st.expander("🎯 Marquee Settings"):
235
+ st.markdown("### 🎯 Marquee Settings")
236
+ cols = st.sidebar.columns(2)
237
+ with cols[0]:
238
+ bg_color = st.color_picker("🎨 Background",
239
+ st.session_state['marquee_settings']["background"],
240
+ key="bg_color_picker")
241
+ text_color = st.color_picker("✍️ Text",
242
+ st.session_state['marquee_settings']["color"],
243
+ key="text_color_picker")
244
+ with cols[1]:
245
+ font_size = st.slider("📏 Size", 10, 24, 14, key="font_size_slider")
246
+ duration = st.slider("⏱️ Speed (secs)", 1, 20, 20, key="duration_slider")
247
+
248
+ st.session_state['marquee_settings'].update({
249
+ "background": bg_color,
250
+ "color": text_color,
251
+ "font-size": f"{font_size}px",
252
+ "animationDuration": f"{duration}s"
253
+ })
254
 
255
  def display_marquee(text, settings, key_suffix=""):
256
  """
 
927
 
928
  # Optionally, replace with your own local image or comment out
929
  try:
930
+ st.image('Group Picture - Voices.png', caption=caption_female + ' | ' + caption_male)
931
  except:
932
+ st.write('.')
933
 
934
  selected_voice = st.sidebar.selectbox(
935
  "👄 Select TTS Voice:",