Spaces:
Running
Running
zach
commited on
Commit
·
e431b2b
1
Parent(s):
5adc4ce
Remove dark theme styles
Browse files- src/constants.py +4 -4
- src/integrations/hume_api.py +4 -3
- src/theme.py +47 -44
src/constants.py
CHANGED
|
@@ -20,7 +20,7 @@ SAMPLE_PROMPTS = {
|
|
| 20 |
'Write a short dramatic monologue from a lone astronaut stranded on Mars, speaking to '
|
| 21 |
'mission control for the last time. The tone should be reflective and filled with awe, conveying '
|
| 22 |
'resignation and finality. Describe the Martian landscape and their thoughts in a way that '
|
| 23 |
-
'would evoke emotion and depth
|
| 24 |
|
| 25 |
'📜 Poetic Sonnet (The Passage of Time)':
|
| 26 |
'Compose a concise sonnet about the passage of time, using vivid imagery and a flowing, '
|
|
@@ -30,16 +30,16 @@ SAMPLE_PROMPTS = {
|
|
| 30 |
"🐱 Whimsical Children's Story (Talking Cat)":
|
| 31 |
'Tell a short, whimsical bedtime story about a mischievous talking cat who sneaks into a grand '
|
| 32 |
'wizard’s library at night and accidentally casts a spell that brings the books to life. Keep the '
|
| 33 |
-
'tone playful and filled with wonder, ensuring the language flows smoothly
|
| 34 |
|
| 35 |
'🔥 Intense Speech (Freedom & Justice)':
|
| 36 |
'Write a powerful, impassioned speech from a rebel leader rallying their people against a '
|
| 37 |
'tyrant. The speech should be urgent, filled with conviction, and call for freedom and justice, '
|
| 38 |
-
'making sure the emotional intensity is evident in the phrasing
|
| 39 |
|
| 40 |
'👻 Mysterious Horror Scene (Haunted Lighthouse)':
|
| 41 |
'Describe a chilling ghostly encounter in an abandoned lighthouse on a foggy night. The '
|
| 42 |
'protagonist, alone and cold, hears whispers from the shadows, telling them secrets they were '
|
| 43 |
'never meant to know. Use language that builds suspense and tension, ensuring it sounds '
|
| 44 |
-
'haunting and engaging
|
| 45 |
}
|
|
|
|
| 20 |
'Write a short dramatic monologue from a lone astronaut stranded on Mars, speaking to '
|
| 21 |
'mission control for the last time. The tone should be reflective and filled with awe, conveying '
|
| 22 |
'resignation and finality. Describe the Martian landscape and their thoughts in a way that '
|
| 23 |
+
'would evoke emotion and depth.',
|
| 24 |
|
| 25 |
'📜 Poetic Sonnet (The Passage of Time)':
|
| 26 |
'Compose a concise sonnet about the passage of time, using vivid imagery and a flowing, '
|
|
|
|
| 30 |
"🐱 Whimsical Children's Story (Talking Cat)":
|
| 31 |
'Tell a short, whimsical bedtime story about a mischievous talking cat who sneaks into a grand '
|
| 32 |
'wizard’s library at night and accidentally casts a spell that brings the books to life. Keep the '
|
| 33 |
+
'tone playful and filled with wonder, ensuring the language flows smoothly.',
|
| 34 |
|
| 35 |
'🔥 Intense Speech (Freedom & Justice)':
|
| 36 |
'Write a powerful, impassioned speech from a rebel leader rallying their people against a '
|
| 37 |
'tyrant. The speech should be urgent, filled with conviction, and call for freedom and justice, '
|
| 38 |
+
'making sure the emotional intensity is evident in the phrasing.',
|
| 39 |
|
| 40 |
'👻 Mysterious Horror Scene (Haunted Lighthouse)':
|
| 41 |
'Describe a chilling ghostly encounter in an abandoned lighthouse on a foggy night. The '
|
| 42 |
'protagonist, alone and cold, hears whispers from the shadows, telling them secrets they were '
|
| 43 |
'never meant to know. Use language that builds suspense and tension, ensuring it sounds '
|
| 44 |
+
'haunting and engaging.'
|
| 45 |
}
|
src/integrations/hume_api.py
CHANGED
|
@@ -121,9 +121,10 @@ def text_to_speech_with_hume(prompt: str, text: str) -> bytes:
|
|
| 121 |
|
| 122 |
# Process audio response
|
| 123 |
if response.headers.get('Content-Type', '').startswith('audio/'):
|
| 124 |
-
|
| 125 |
-
logger.info(f'Received audio data from Hume ({len(
|
| 126 |
-
|
|
|
|
| 127 |
|
| 128 |
# Unexpected content type
|
| 129 |
raise HumeError(f'Unexpected Content-Type: {response.headers.get("Content-Type", "Unknown")}')
|
|
|
|
| 121 |
|
| 122 |
# Process audio response
|
| 123 |
if response.headers.get('Content-Type', '').startswith('audio/'):
|
| 124 |
+
audio = response.content # Raw binary audio data
|
| 125 |
+
logger.info(f'Received audio data from Hume ({len(audio)} bytes).')
|
| 126 |
+
|
| 127 |
+
return audio
|
| 128 |
|
| 129 |
# Unexpected content type
|
| 130 |
raise HumeError(f'Unexpected Content-Type: {response.headers.get("Content-Type", "Unknown")}')
|
src/theme.py
CHANGED
|
@@ -49,51 +49,54 @@ class CustomTheme(Base):
|
|
| 49 |
)
|
| 50 |
self.name = 'custom_theme'
|
| 51 |
super().set(
|
| 52 |
-
# Colors
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
#
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
button_border_width='0px',
|
| 65 |
input_border_width='1px',
|
| 66 |
-
|
| 67 |
-
#
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
checkbox_label_background_fill='#F3F4F6',
|
| 71 |
-
checkbox_label_background_fill_dark='#1F2937',
|
| 72 |
-
checkbox_label_background_fill_hover='#E5E7EB',
|
| 73 |
-
checkbox_label_background_fill_hover_dark='#374151',
|
| 74 |
-
# Primary Button
|
| 75 |
-
button_primary_background_fill='#111111',
|
| 76 |
-
button_primary_background_fill_dark='#171717',
|
| 77 |
button_primary_background_fill_hover='#3F3F3F',
|
| 78 |
-
button_primary_background_fill_hover_dark='
|
| 79 |
-
button_primary_text_color='#FFFFFF',
|
| 80 |
-
button_primary_text_color_dark='
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
#
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
#
|
| 98 |
-
|
|
|
|
|
|
|
|
|
|
| 99 |
)
|
|
|
|
| 49 |
)
|
| 50 |
self.name = 'custom_theme'
|
| 51 |
super().set(
|
| 52 |
+
# --- Colors ---
|
| 53 |
+
error_background_fill='#EF4444',
|
| 54 |
+
# error_background_fill_dark='',
|
| 55 |
+
error_border_color='#B91C1C',
|
| 56 |
+
# error_border_color_dark='',
|
| 57 |
+
error_icon_color='#B91C1C',
|
| 58 |
+
# error_icon_color_dark='',
|
| 59 |
+
input_background_fill='#F9FAFB',
|
| 60 |
+
# input_background_fill_dark='',
|
| 61 |
+
|
| 62 |
+
# --- Shadows ---
|
| 63 |
+
input_shadow_focus='0 0 0 *shadow_spread #7C3AED80, *shadow_inset',
|
| 64 |
+
# input_shadow_focus_dark='',
|
| 65 |
+
|
| 66 |
+
# --- Gradients ---
|
| 67 |
+
stat_background_fill='linear-gradient(to right, #7C3AED, #D8B4FE)',
|
| 68 |
+
# stat_background_fill_dark='',
|
| 69 |
+
|
| 70 |
+
# --- Button borders ---
|
| 71 |
button_border_width='0px',
|
| 72 |
input_border_width='1px',
|
| 73 |
+
|
| 74 |
+
# --- Primary Button ---
|
| 75 |
+
button_primary_background_fill='#111111',
|
| 76 |
+
# button_primary_background_fill_dark='',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
button_primary_background_fill_hover='#3F3F3F',
|
| 78 |
+
# button_primary_background_fill_hover_dark='',
|
| 79 |
+
button_primary_text_color='#FFFFFF',
|
| 80 |
+
# button_primary_text_color_dark='',
|
| 81 |
+
|
| 82 |
+
# --- Secondary Button ---
|
| 83 |
+
button_secondary_background_fill='#E5E7EB',
|
| 84 |
+
# button_secondary_background_fill_dark='#4B5563',
|
| 85 |
+
button_secondary_background_fill_hover='#D1D5DB',
|
| 86 |
+
# button_secondary_background_fill_hover_dark='#374151',
|
| 87 |
+
button_secondary_text_color='#111827',
|
| 88 |
+
# button_secondary_text_color_dark='#FFFFFF',
|
| 89 |
+
|
| 90 |
+
# --- Cancel Button ---
|
| 91 |
+
button_cancel_background_fill='#EF4444',
|
| 92 |
+
# button_cancel_background_fill_dark='#B91C1C',
|
| 93 |
+
button_cancel_background_fill_hover='#DC2626',
|
| 94 |
+
# button_cancel_background_fill_hover_dark='#991B1B',
|
| 95 |
+
button_cancel_text_color='#FFFFFF',
|
| 96 |
+
# button_cancel_text_color_dark='#FFFFFF',
|
| 97 |
+
button_cancel_text_color_hover='#FFFFFF',
|
| 98 |
+
# button_cancel_text_color_hover_dark='#FFFFFF',
|
| 99 |
+
|
| 100 |
+
# --- Other ---
|
| 101 |
+
border_color_accent_subdued='#A78BFA',
|
| 102 |
)
|