Update app.py
Browse files
app.py
CHANGED
@@ -33,15 +33,13 @@ def show_prayer_and_music(prayer_selection, music_selection):
|
|
33 |
music_url = music_urls.get(music_selection, "")
|
34 |
|
35 |
html_code = f"""
|
36 |
-
<
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
}}
|
44 |
-
</style>
|
45 |
"""
|
46 |
|
47 |
return prayer_text, html_code
|
@@ -71,16 +69,16 @@ prayer_options = [
|
|
71 |
|
72 |
music_options = ["μμ
1", "μμ
2"]
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
)
|
85 |
-
|
86 |
interface.launch()
|
|
|
33 |
music_url = music_urls.get(music_selection, "")
|
34 |
|
35 |
html_code = f"""
|
36 |
+
<div style="text-align: center; padding: 20px; background-color: #FFF8E7; border-radius: 15px; box-shadow: 2px 2px 10px rgba(0,0,0,0.1);">
|
37 |
+
<h3 style="color: #6B4226; font-family: 'Arial', sans-serif;">ν¬κ·Όν κΈ°λμ μμ
</h3>
|
38 |
+
<audio id="background-music" controls autoplay loop style="width: 100%; max-width: 400px; margin-top: 10px;">
|
39 |
+
<source src="{music_url}" type="audio/mpeg">
|
40 |
+
Your browser does not support the audio element.
|
41 |
+
</audio>
|
42 |
+
</div>
|
|
|
|
|
43 |
"""
|
44 |
|
45 |
return prayer_text, html_code
|
|
|
69 |
|
70 |
music_options = ["μμ
1", "μμ
2"]
|
71 |
|
72 |
+
with gr.Blocks(css="body { background-color: #FAF3E0; font-family: 'Nanum Myeongjo', serif; }") as interface:
|
73 |
+
gr.Markdown("### π ν¬κ·Όν κΈ°λμ μμ
πΆ")
|
74 |
+
|
75 |
+
with gr.Row():
|
76 |
+
prayer_dropdown = gr.Dropdown(choices=prayer_options, label="κΈ°λλ¬Έ μ ν")
|
77 |
+
music_dropdown = gr.Dropdown(choices=music_options, label="λ°°κ²½μμ
μ ν")
|
78 |
+
|
79 |
+
output_text = gr.Textbox(label="κΈ°λλ¬Έ", interactive=False, lines=8)
|
80 |
+
output_html = gr.HTML(label="λ°°κ²½μμ
")
|
81 |
+
|
82 |
+
gr.Button("κΈ°λ μμ").click(show_prayer_and_music, inputs=[prayer_dropdown, music_dropdown], outputs=[output_text, output_html])
|
83 |
+
|
84 |
interface.launch()
|