englissi commited on
Commit
d17b338
Β·
verified Β·
1 Parent(s): 3d61e22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -75
app.py CHANGED
@@ -168,83 +168,16 @@ with gr.Blocks(title="πŸ“š κ·€μ—¬μš΄ μŠ€ν† λ¦¬ μ•±") as demo:
168
  font-size: 1.2em;
169
  color: #6B4226;
170
  }
171
- </style>
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
- font-size: 1.2em;
247
- color: #6B4226;
 
 
 
 
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
  """)