Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,6 +50,21 @@ def generate_audio(text):
|
|
50 |
print(f"β οΈ μμ± μμ± μ€ν¨: {e}")
|
51 |
return None
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
# π "λ€μ" λ²νΌ ν΄λ¦ μ νΈμΆλλ ν¨μ
|
54 |
def next_story(current_index, story_list):
|
55 |
new_index = (current_index + 1) % len(story_list)
|
@@ -101,20 +116,7 @@ with gr.Blocks(title="π κ·μ¬μ΄ μ€ν 리 μ±") as demo:
|
|
101 |
outputs=[state_index_long, story_text_long, story_image_long, audio_output_long, state_text_long]
|
102 |
)
|
103 |
|
104 |
-
|
105 |
-
def format_story_text(text):
|
106 |
-
return f"""
|
107 |
-
<div style='
|
108 |
-
font-size:4em;
|
109 |
-
font-weight:bold;
|
110 |
-
text-align:center;
|
111 |
-
color:#FF4500;
|
112 |
-
font-family:sans-serif;
|
113 |
-
margin: 20px 0;
|
114 |
-
'>
|
115 |
-
{text}
|
116 |
-
</div>
|
117 |
-
"""
|
118 |
|
119 |
# CSS μ€νμΌ μΆκ° (κ·μ¬μ΄ ν
λ§)
|
120 |
demo.css = """
|
|
|
50 |
print(f"β οΈ μμ± μμ± μ€ν¨: {e}")
|
51 |
return None
|
52 |
|
53 |
+
# π μ€ν 리 ν
μ€νΈλ₯Ό HTML μ€νμΌλ‘ ν¬κ² νμνκ³ μ€μ μ λ ¬νλ ν¨μ
|
54 |
+
def format_story_text(text):
|
55 |
+
return f"""
|
56 |
+
<div style='
|
57 |
+
font-size:4em;
|
58 |
+
font-weight:bold;
|
59 |
+
text-align:center;
|
60 |
+
color:#FF4500;
|
61 |
+
font-family:sans-serif;
|
62 |
+
margin: 20px 0;
|
63 |
+
'>
|
64 |
+
{text}
|
65 |
+
</div>
|
66 |
+
"""
|
67 |
+
|
68 |
# π "λ€μ" λ²νΌ ν΄λ¦ μ νΈμΆλλ ν¨μ
|
69 |
def next_story(current_index, story_list):
|
70 |
new_index = (current_index + 1) % len(story_list)
|
|
|
116 |
outputs=[state_index_long, story_text_long, story_image_long, audio_output_long, state_text_long]
|
117 |
)
|
118 |
|
119 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
# CSS μ€νμΌ μΆκ° (κ·μ¬μ΄ ν
λ§)
|
122 |
demo.css = """
|