Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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.
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 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.
|
| 930 |
except:
|
| 931 |
-
st.
|
| 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:",
|