Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -168,83 +168,16 @@ with gr.Blocks(title="π κ·μ¬μ΄ μ€ν 리 μ±") as demo:
|
|
| 168 |
font-size: 1.2em;
|
| 169 |
color: #6B4226;
|
| 170 |
}
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
gr.HTML("<h1>π μ¬λ―Έμλ μμ΄ μ€ν 리 νμ! π</h1>")
|
| 175 |
-
gr.HTML("<p>π± κ·μ¬μ΄ μ΄μΌκΈ°μ ν¨κ» μμ΄λ₯Ό λ°°μ보μμ! <br> λ²νΌμ λλ¬ λ€μ μ΄μΌκΈ°λ‘ λμ΄κ°κ³ , μμ±μ λ€μΌλ©° λ°λΌ μ½μ΄λ³΄μΈμ! π΅</p>")
|
| 176 |
-
|
| 177 |
-
# π λ¨λͺ¨μ(Short Vowel) μ€ν 리 λ°μ΄ν°
|
| 178 |
-
short_vowel_stories = [
|
| 179 |
-
{"text": "Sam has a cat.", "image": f"{image_base_url}1.webp"},
|
| 180 |
-
{"text": "The cat is fat and tan.", "image": f"{image_base_url}2.webp"},
|
| 181 |
-
{"text": "Sam and the cat nap on a mat.", "image": f"{image_base_url}3.webp"}
|
| 182 |
-
]
|
| 183 |
-
|
| 184 |
-
# π μ₯λͺ¨μ(Long Vowel) μ€ν 리 λ°μ΄ν°
|
| 185 |
-
long_vowel_stories = [
|
| 186 |
-
{"text": "Kate ate a big cake.", "image": f"{image_base_url}11.webp"},
|
| 187 |
-
{"text": "The train is late today.", "image": f"{image_base_url}12.webp"},
|
| 188 |
-
{"text": "I see a green tree.", "image": f"{image_base_url}13.webp"}
|
| 189 |
-
]
|
| 190 |
-
|
| 191 |
-
# π Blends & Digraphs μ€ν 리 λ°μ΄ν°
|
| 192 |
-
blends_digraphs_stories = [
|
| 193 |
-
{"text": "Blake blows a blue blimp.", "image": f"{image_base_url}21.webp"},
|
| 194 |
-
{"text": "Brad brings a brown brush.", "image": f"{image_base_url}22.webp"},
|
| 195 |
-
{"text": "The clock clicks and claps.", "image": f"{image_base_url}23.webp"}
|
| 196 |
-
]
|
| 197 |
-
|
| 198 |
-
# π "The Red Ball" μ€ν 리 λ°μ΄ν°
|
| 199 |
-
the_red_ball_story = [
|
| 200 |
-
{"text": "Tom has a red ball. He throws the ball up. The ball goes high. Then it falls down!", "image": f"{image_base_url}39.webp"}
|
| 201 |
-
]
|
| 202 |
-
|
| 203 |
-
# π "The Big Cat" μ€ν 리 λ°μ΄ν°
|
| 204 |
-
the_big_cat_story = [
|
| 205 |
-
{"text": "The cat is big. It jumps on the mat. The mat is soft. The cat takes a nap.", "image": f"{image_base_url}40.webp"}
|
| 206 |
-
]
|
| 207 |
-
|
| 208 |
-
# π "The Hot Sun" μ€ν 리 λ°μ΄ν°
|
| 209 |
-
the_hot_sun_story = [
|
| 210 |
-
{"text": "The sun is hot. I wear my hat. I drink some water. Now I feel cool!", "image": f"{image_base_url}41.webp"}
|
| 211 |
-
]
|
| 212 |
-
|
| 213 |
-
# π μ΄κΈ° κ° μ€μ
|
| 214 |
-
init_index_short = 0
|
| 215 |
-
init_text_short = short_vowel_stories[0]["text"]
|
| 216 |
-
init_image_short = short_vowel_stories[0]["image"]
|
| 217 |
-
init_audio_short = generate_audio(init_text_short)
|
| 218 |
-
|
| 219 |
-
init_index_long = 0
|
| 220 |
-
init_text_long = long_vowel_stories[0]["text"]
|
| 221 |
-
init_image_long = long_vowel_stories[0]["image"]
|
| 222 |
-
init_audio_long = generate_audio(init_text_long)
|
| 223 |
-
|
| 224 |
-
init_index_blends = 0
|
| 225 |
-
init_text_blends = blends_digraphs_stories[0]["text"]
|
| 226 |
-
init_image_blends = blends_digraphs_stories[0]["image"]
|
| 227 |
-
init_audio_blends = generate_audio(init_text_blends)
|
| 228 |
-
|
| 229 |
-
# π Gradio UI ꡬμ±μ μλ‘μ΄ ν μΆκ°
|
| 230 |
-
with gr.Blocks(title="π κ·μ¬μ΄ μ€ν 리 μ±") as demo:
|
| 231 |
-
gr.HTML("""
|
| 232 |
-
<style>
|
| 233 |
-
body {
|
| 234 |
-
background-color: #FFFAF0;
|
| 235 |
-
font-family: 'Comic Sans MS', cursive, sans-serif;
|
| 236 |
-
}
|
| 237 |
-
h1 {
|
| 238 |
-
color: #FF6347;
|
| 239 |
-
text-align: center;
|
| 240 |
-
font-size: 3em;
|
| 241 |
font-weight: bold;
|
| 242 |
-
margin-top: 20px;
|
| 243 |
-
}
|
| 244 |
-
p {
|
| 245 |
text-align: center;
|
| 246 |
-
|
| 247 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
}
|
| 249 |
</style>
|
| 250 |
""")
|
|
|
|
| 168 |
font-size: 1.2em;
|
| 169 |
color: #6B4226;
|
| 170 |
}
|
| 171 |
+
.story-text {
|
| 172 |
+
font-size: 2.5em;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
font-weight: bold;
|
|
|
|
|
|
|
|
|
|
| 174 |
text-align: center;
|
| 175 |
+
color: #FF4500;
|
| 176 |
+
padding: 20px;
|
| 177 |
+
border-radius: 15px;
|
| 178 |
+
background: #FFF3E0;
|
| 179 |
+
display: inline-block;
|
| 180 |
+
box-shadow: 4px 4px 10px rgba(0,0,0,0.2);
|
| 181 |
}
|
| 182 |
</style>
|
| 183 |
""")
|