Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -122,54 +122,6 @@ def generate_audio_from_story(story_text: str) -> str:
|
|
122 |
except Exception as error:
|
123 |
raise RuntimeError(f"Audio synthesis failed: {str(error)}") from error
|
124 |
|
125 |
-
|
126 |
-
# ======================================
|
127 |
-
# Page Configuration & Custom Styling
|
128 |
-
# ======================================
|
129 |
-
st.set_page_config(
|
130 |
-
page_title="Magic Story Generator",
|
131 |
-
page_icon="🧚",
|
132 |
-
layout="centered",
|
133 |
-
initial_sidebar_state="collapsed"
|
134 |
-
)
|
135 |
-
|
136 |
-
# Custom CSS styling for child-friendly interface
|
137 |
-
st.markdown("""
|
138 |
-
<style>
|
139 |
-
/* Prompt buttons styling */
|
140 |
-
.prompt-btn {
|
141 |
-
background: #4CAF50 !important;
|
142 |
-
border-radius: 15px !important;
|
143 |
-
padding: 15px 30px !important;
|
144 |
-
font-size: 1.1rem !important;
|
145 |
-
margin: 10px;
|
146 |
-
}
|
147 |
-
|
148 |
-
/* Story container styling */
|
149 |
-
.story-container {
|
150 |
-
background: #FFF3E0;
|
151 |
-
border-radius: 20px;
|
152 |
-
padding: 25px;
|
153 |
-
margin: 20px 0;
|
154 |
-
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
155 |
-
}
|
156 |
-
/* Image caption styling */
|
157 |
-
.image-caption {
|
158 |
-
border-left: 4px solid #4CAF50;
|
159 |
-
padding-left: 1rem;
|
160 |
-
font-size: 1.1rem;
|
161 |
-
color: #2c3e50;
|
162 |
-
margin: 1.5rem 0;
|
163 |
-
}
|
164 |
-
|
165 |
-
/* Progress spinner styling */
|
166 |
-
.stSpinner > div {
|
167 |
-
font-size: 1.2rem !important;
|
168 |
-
color: #9C27B0 !important;
|
169 |
-
}
|
170 |
-
</style>
|
171 |
-
""", unsafe_allow_html=True)
|
172 |
-
|
173 |
# ======================================
|
174 |
# Main Application Interface
|
175 |
# ======================================
|
|
|
122 |
except Exception as error:
|
123 |
raise RuntimeError(f"Audio synthesis failed: {str(error)}") from error
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
# ======================================
|
126 |
# Main Application Interface
|
127 |
# ======================================
|