Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import
|
| 3 |
-
import json
|
| 4 |
import re
|
| 5 |
-
import os
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
def generate_story(age, theme, language):
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
| 16 |
age_i = int(age)
|
| 17 |
if age_i <= 6:
|
| 18 |
length = "300 words"
|
|
@@ -21,186 +26,172 @@ def generate_story(age, theme, language):
|
|
| 21 |
else:
|
| 22 |
length = "1000 words"
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
"
|
| 27 |
-
{
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
{
|
| 32 |
-
"role": "user",
|
| 33 |
-
"content": (
|
| 34 |
-
f"Write a complete story for a {age}-year-old child. "
|
| 35 |
-
f"Theme: {theme}. Language: {language}. Length about {length}. "
|
| 36 |
-
"End with a clear moral of the story."
|
| 37 |
-
)
|
| 38 |
-
}
|
| 39 |
-
],
|
| 40 |
-
"model": "llama-3.1-8b-instant",
|
| 41 |
-
"max_tokens": 2000,
|
| 42 |
-
"temperature": 0.8
|
| 43 |
}
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
"
|
| 48 |
-
|
|
|
|
|
|
|
| 49 |
|
| 50 |
-
|
| 51 |
-
response = requests.post(GROQ_API_URL, json=payload, headers=headers)
|
| 52 |
-
response.raise_for_status()
|
| 53 |
-
|
| 54 |
-
data = response.json()
|
| 55 |
-
story = data["choices"][0]["message"]["content"].strip()
|
| 56 |
-
return story
|
| 57 |
-
|
| 58 |
-
except Exception as e:
|
| 59 |
-
return f"Error generating story: {str(e)}\n\nPlease check your API key and try again."
|
| 60 |
|
| 61 |
def story_to_speech(story, language_code='en'):
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
tts.save(filename)
|
| 67 |
-
return filename
|
| 68 |
-
except Exception as e:
|
| 69 |
-
print(f"TTS Error: {e}")
|
| 70 |
-
return None
|
| 71 |
|
| 72 |
def create_story_interface(age, theme, language, tts_option):
|
| 73 |
story = generate_story(age, theme, language)
|
| 74 |
|
| 75 |
-
# Remove Markdown symbols
|
| 76 |
story = re.sub(r'[*_#`~]', '', story)
|
| 77 |
|
| 78 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
if language.lower().startswith("u"): # Urdu
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
lang_code = "ur"
|
| 81 |
else: # English
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
lang_code = "en"
|
| 83 |
|
|
|
|
| 84 |
audio_file = story_to_speech(story, lang_code) if tts_option else None
|
| 85 |
|
| 86 |
-
return
|
| 87 |
|
| 88 |
-
# Age options
|
| 89 |
age_options = [str(i) for i in range(3, 13)]
|
| 90 |
-
|
| 91 |
-
# Theme options
|
| 92 |
theme_options = [
|
| 93 |
"Adventure", "Animals", "Fantasy", "Educational",
|
| 94 |
"Friendship", "Magic", "Science", "Mystery",
|
| 95 |
"Space", "Nature", "Kindness", "Courage"
|
| 96 |
]
|
| 97 |
-
|
| 98 |
language_options = ["English", "Urdu"]
|
| 99 |
|
| 100 |
-
#
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
# Header
|
| 201 |
gr.HTML("""
|
| 202 |
<div class="main-header">
|
| 203 |
-
π StoryTime AI
|
| 204 |
</div>
|
| 205 |
""")
|
| 206 |
|
|
@@ -209,108 +200,57 @@ with gr.Blocks() as iface:
|
|
| 209 |
π― Create amazing stories that spark imagination and teach valuable lessons!
|
| 210 |
</div>
|
| 211 |
""")
|
| 212 |
-
|
| 213 |
-
# API Key warning
|
| 214 |
-
if not GROQ_API_KEY:
|
| 215 |
-
gr.HTML("""
|
| 216 |
-
<div class="warning-box">
|
| 217 |
-
<h3 style="color: #856404; margin: 0 0 10px 0;">β οΈ Setup Required</h3>
|
| 218 |
-
<p style="color: #856404; margin: 0;">
|
| 219 |
-
To generate stories, please add your <strong>GROQ_API_KEY</strong> in the Hugging Face Space settings:<br>
|
| 220 |
-
1. Go to your Space β Settings β Repository secrets<br>
|
| 221 |
-
2. Add new secret: Name = <code>GROQ_API_KEY</code>, Value = your_api_key<br>
|
| 222 |
-
3. Get your API key from: <a href="https://console.groq.com" target="_blank">https://console.groq.com</a>
|
| 223 |
-
</p>
|
| 224 |
-
</div>
|
| 225 |
-
""")
|
| 226 |
|
| 227 |
with gr.Row():
|
| 228 |
-
# Left Column - Controls
|
| 229 |
with gr.Column(scale=1, min_width=300):
|
| 230 |
-
gr.
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
info="English or Urdu"
|
| 252 |
-
)
|
| 253 |
-
|
| 254 |
-
tts_input = gr.Checkbox(
|
| 255 |
-
label="π Include Audio Story",
|
| 256 |
-
value=True,
|
| 257 |
-
info="Generate audio narration"
|
| 258 |
-
)
|
| 259 |
-
|
| 260 |
-
gr.HTML('</div>')
|
| 261 |
-
|
| 262 |
-
generate_btn = gr.Button(
|
| 263 |
-
"β¨ Create Magical Story! β¨"
|
| 264 |
-
)
|
| 265 |
-
|
| 266 |
-
# Right Column - Output
|
| 267 |
with gr.Column(scale=2):
|
| 268 |
-
gr.
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
# Footer
|
| 284 |
gr.HTML("""
|
| 285 |
<div class="footer">
|
| 286 |
Made with β€οΈ for young readers everywhere! | Watch your stories come to life! β¨
|
| 287 |
</div>
|
| 288 |
""")
|
| 289 |
|
| 290 |
-
# Apply button styling with JavaScript
|
| 291 |
-
gr.HTML("""
|
| 292 |
-
<script>
|
| 293 |
-
function styleButton() {
|
| 294 |
-
const buttons = document.querySelectorAll('button');
|
| 295 |
-
buttons.forEach(button => {
|
| 296 |
-
if (button.textContent.includes('Create Magical Story')) {
|
| 297 |
-
button.classList.add('generate-btn');
|
| 298 |
-
}
|
| 299 |
-
});
|
| 300 |
-
}
|
| 301 |
-
// Style button on load and when DOM changes
|
| 302 |
-
document.addEventListener('DOMContentLoaded', styleButton);
|
| 303 |
-
setTimeout(styleButton, 1000);
|
| 304 |
-
setInterval(styleButton, 2000);
|
| 305 |
-
</script>
|
| 306 |
-
""")
|
| 307 |
-
|
| 308 |
generate_btn.click(
|
| 309 |
create_story_interface,
|
| 310 |
-
|
| 311 |
-
|
| 312 |
)
|
| 313 |
|
| 314 |
-
# Launch without SSR to avoid the warning
|
| 315 |
if __name__ == "__main__":
|
| 316 |
-
iface.launch(
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from groq import Groq
|
| 3 |
import gradio as gr
|
| 4 |
+
from gtts import gTTS
|
|
|
|
| 5 |
import re
|
|
|
|
| 6 |
|
| 7 |
+
# Get API key from Hugging Face Secrets
|
| 8 |
+
groq_key = os.environ.get("GROQ_API_KEY")
|
| 9 |
+
|
| 10 |
+
if not groq_key:
|
| 11 |
+
raise ValueError("GROQ_API_KEY not found in environment variables. Please add it to your Hugging Face Space secrets.")
|
| 12 |
+
|
| 13 |
+
client = Groq(api_key=groq_key)
|
| 14 |
|
| 15 |
def generate_story(age, theme, language):
|
| 16 |
+
system_msg = {
|
| 17 |
+
"role": "system",
|
| 18 |
+
"content": "You write age-appropriate stories with complete endings and a moral."
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
age_i = int(age)
|
| 22 |
if age_i <= 6:
|
| 23 |
length = "300 words"
|
|
|
|
| 26 |
else:
|
| 27 |
length = "1000 words"
|
| 28 |
|
| 29 |
+
user_msg = {
|
| 30 |
+
"role": "user",
|
| 31 |
+
"content": (
|
| 32 |
+
f"Write a complete story for a {age}-year-old child. "
|
| 33 |
+
f"Theme: {theme}. Language: {language}. Length about {length}. "
|
| 34 |
+
"End with a clear moral of the story."
|
| 35 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
+
response = client.chat.completions.create(
|
| 39 |
+
messages=[system_msg, user_msg],
|
| 40 |
+
model="llama-3.3-70b-versatile",
|
| 41 |
+
max_tokens=2000,
|
| 42 |
+
temperature=0.8
|
| 43 |
+
)
|
| 44 |
|
| 45 |
+
return response.choices[0].message.content.strip()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
def story_to_speech(story, language_code='en'):
|
| 48 |
+
tts = gTTS(text=story, lang=language_code)
|
| 49 |
+
filename = "story.mp3"
|
| 50 |
+
tts.save(filename)
|
| 51 |
+
return filename
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
def create_story_interface(age, theme, language, tts_option):
|
| 54 |
story = generate_story(age, theme, language)
|
| 55 |
|
| 56 |
+
# Remove Markdown symbols
|
| 57 |
story = re.sub(r'[*_#`~]', '', story)
|
| 58 |
|
| 59 |
+
# Split first line as title
|
| 60 |
+
lines = story.split("\n", 1)
|
| 61 |
+
if len(lines) > 1:
|
| 62 |
+
title, rest_of_story = lines[0], lines[1]
|
| 63 |
+
else:
|
| 64 |
+
title, rest_of_story = lines[0], ""
|
| 65 |
+
|
| 66 |
if language.lower().startswith("u"): # Urdu
|
| 67 |
+
story_html = (
|
| 68 |
+
f'<div style="text-align:center; font-size:1.3em; direction:rtl; margin-bottom:5px;">{title}</div>'
|
| 69 |
+
f'<div style="font-size:1.2em; direction:rtl; text-align:right;">{rest_of_story}</div>'
|
| 70 |
+
)
|
| 71 |
lang_code = "ur"
|
| 72 |
else: # English
|
| 73 |
+
story_html = (
|
| 74 |
+
f'<div style="text-align:center; font-size:1.3em; direction:ltr; margin-bottom:5px;">{title}</div>'
|
| 75 |
+
f'<div style="font-size:1.2em; direction:ltr; text-align:left;">{rest_of_story}</div>'
|
| 76 |
+
)
|
| 77 |
lang_code = "en"
|
| 78 |
|
| 79 |
+
# Generate audio if TTS is enabled
|
| 80 |
audio_file = story_to_speech(story, lang_code) if tts_option else None
|
| 81 |
|
| 82 |
+
return story_html, audio_file
|
| 83 |
|
|
|
|
| 84 |
age_options = [str(i) for i in range(3, 13)]
|
|
|
|
|
|
|
| 85 |
theme_options = [
|
| 86 |
"Adventure", "Animals", "Fantasy", "Educational",
|
| 87 |
"Friendship", "Magic", "Science", "Mystery",
|
| 88 |
"Space", "Nature", "Kindness", "Courage"
|
| 89 |
]
|
|
|
|
| 90 |
language_options = ["English", "Urdu"]
|
| 91 |
|
| 92 |
+
# Custom CSS for child-friendly interface
|
| 93 |
+
custom_css = """
|
| 94 |
+
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap');
|
| 95 |
+
|
| 96 |
+
.gradio-container {
|
| 97 |
+
font-family: 'Comic Neue', cursive !important;
|
| 98 |
+
background: linear-gradient(135deg, #ffafbd, #ffc3a0) !important;
|
| 99 |
+
padding-top: 10px !important;
|
| 100 |
+
margin-top: -70px !important;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.main-header {
|
| 104 |
+
text-align: center;
|
| 105 |
+
font-weight: bold !important;
|
| 106 |
+
font-size: 3.2em !important;
|
| 107 |
+
margin-top: 40px !important;
|
| 108 |
+
margin-bottom: 20px !important;
|
| 109 |
+
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
|
| 110 |
+
color: #12979B;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.story-container {
|
| 114 |
+
background:#fff5ee;
|
| 115 |
+
border-radius: 20px;
|
| 116 |
+
padding: 25px;
|
| 117 |
+
border: 5px solid #FFD166;
|
| 118 |
+
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
|
| 119 |
+
min-height: 400px;
|
| 120 |
+
margin-top: -20px !important;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.control-panel {
|
| 124 |
+
background: #fff5ee;;
|
| 125 |
+
border-radius: 15px;
|
| 126 |
+
padding: 20px;
|
| 127 |
+
border: 3px dashed #4ECDC4;
|
| 128 |
+
font-size: 1.2em !important;
|
| 129 |
+
font-weight: 600;
|
| 130 |
+
margin-top: -20px !important;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.generate-btn {
|
| 134 |
+
background: linear-gradient(45deg, #FF6B6B, #FF9E7D) !important;
|
| 135 |
+
border: none !important;
|
| 136 |
+
border-radius: 50px !important;
|
| 137 |
+
padding: 10px 22px !important;
|
| 138 |
+
font-size: 1em !important;
|
| 139 |
+
font-weight: bold !important;
|
| 140 |
+
color: white !important;
|
| 141 |
+
margin-top: 20px !important;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.generate-btn:hover {
|
| 145 |
+
transform: scale(1.05);
|
| 146 |
+
box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
.dropdown, .checkbox {
|
| 150 |
+
background: white !important;
|
| 151 |
+
border-radius: 10px !important;
|
| 152 |
+
border: 2px solid #96CEB4 !important;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.audio-player {
|
| 156 |
+
border-radius: 15px !important;
|
| 157 |
+
margin-top: 20px;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.subtitle {
|
| 161 |
+
text-align: left;
|
| 162 |
+
font-size: 1.5em !important;
|
| 163 |
+
font-weight: 600;
|
| 164 |
+
color: white;
|
| 165 |
+
margin-top: -10px !important;
|
| 166 |
+
margin-bottom: 20px;
|
| 167 |
+
text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.control-panel .gr-Markdown {
|
| 171 |
+
font-size: 1.5em !important;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.story-container .gr-Markdown {
|
| 175 |
+
font-size: 1.5em !important;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
.footer {
|
| 179 |
+
text-align: center;
|
| 180 |
+
margin-top: 20px;
|
| 181 |
+
color: #666;
|
| 182 |
+
font-style: italic;
|
| 183 |
+
font-size: 1.5em !important;
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
.main-header + div {
|
| 187 |
+
margin-top: -145px !important;
|
| 188 |
+
}
|
| 189 |
+
"""
|
| 190 |
+
|
| 191 |
+
with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as iface:
|
|
|
|
| 192 |
gr.HTML("""
|
| 193 |
<div class="main-header">
|
| 194 |
+
π StoryTime AIπͺ
|
| 195 |
</div>
|
| 196 |
""")
|
| 197 |
|
|
|
|
| 200 |
π― Create amazing stories that spark imagination and teach valuable lessons!
|
| 201 |
</div>
|
| 202 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
|
| 204 |
with gr.Row():
|
|
|
|
| 205 |
with gr.Column(scale=1, min_width=300):
|
| 206 |
+
with gr.Group(elem_classes="control-panel"):
|
| 207 |
+
gr.Markdown("### π¨ Story Settings")
|
| 208 |
+
|
| 209 |
+
with gr.Group():
|
| 210 |
+
gr.Markdown("πΆ **Child's Age**")
|
| 211 |
+
age_input = gr.Dropdown(age_options, label="", value="5", show_label=False)
|
| 212 |
+
|
| 213 |
+
with gr.Group():
|
| 214 |
+
gr.Markdown("π **Story Theme**")
|
| 215 |
+
theme_input = gr.Dropdown(theme_options, label="", value="Adventure", show_label=False)
|
| 216 |
+
|
| 217 |
+
with gr.Group():
|
| 218 |
+
gr.Markdown("π **Language**")
|
| 219 |
+
language_input = gr.Dropdown(language_options, label="", value="English", show_label=False)
|
| 220 |
+
|
| 221 |
+
with gr.Group():
|
| 222 |
+
gr.Markdown("π **Audio Options**")
|
| 223 |
+
tts_input = gr.Checkbox(label="π΅ Include Audio Story", value=True)
|
| 224 |
+
|
| 225 |
+
generate_btn = gr.Button("β¨ Create Magical Story! β¨", elem_classes="generate-btn", size="lg")
|
| 226 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
with gr.Column(scale=2):
|
| 228 |
+
with gr.Group(elem_classes="story-container"):
|
| 229 |
+
gr.Markdown("### π Your Magical Story")
|
| 230 |
+
story_output = gr.Markdown(
|
| 231 |
+
"Your story will appear here! Choose settings and click the magic button! π",
|
| 232 |
+
show_label=False
|
| 233 |
+
)
|
| 234 |
+
|
| 235 |
+
with gr.Group():
|
| 236 |
+
gr.Markdown("### π§ Listen to Your Story")
|
| 237 |
+
audio_output = gr.Audio(
|
| 238 |
+
label="Audio Story",
|
| 239 |
+
elem_classes="audio-player",
|
| 240 |
+
show_label=False
|
| 241 |
+
)
|
| 242 |
+
|
|
|
|
| 243 |
gr.HTML("""
|
| 244 |
<div class="footer">
|
| 245 |
Made with β€οΈ for young readers everywhere! | Watch your stories come to life! β¨
|
| 246 |
</div>
|
| 247 |
""")
|
| 248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 249 |
generate_btn.click(
|
| 250 |
create_story_interface,
|
| 251 |
+
[age_input, theme_input, language_input, tts_input],
|
| 252 |
+
[story_output, audio_output]
|
| 253 |
)
|
| 254 |
|
|
|
|
| 255 |
if __name__ == "__main__":
|
| 256 |
+
iface.launch()
|