Update app.py
Browse files
app.py
CHANGED
@@ -8,9 +8,9 @@ def show_prayer_and_music(prayer_selection, music_selection):
|
|
8 |
}
|
9 |
|
10 |
music_urls = {
|
11 |
-
"
|
12 |
-
"
|
13 |
-
"
|
14 |
}
|
15 |
|
16 |
prayer_text = prayers.get(prayer_selection, "μ νλ κΈ°λκ° μμ΅λλ€.")
|
@@ -18,7 +18,7 @@ def show_prayer_and_music(prayer_selection, music_selection):
|
|
18 |
|
19 |
html_code = f"""
|
20 |
<audio id="background-music" controls autoplay loop>
|
21 |
-
<source src="{music_url}" type="audio/
|
22 |
Your browser does not support the audio element.
|
23 |
</audio>
|
24 |
<style>
|
@@ -34,9 +34,9 @@ prayer_options = ["보νμ κΈ°λ", "μλ
λ₯Ό μν κΈ°λ", "μΉμ κΈ°λ"]
|
|
34 |
music_options = ["μμ
1", "μμ
2", "μμ
3"]
|
35 |
|
36 |
prayer_dropdown = gr.Dropdown(choices=prayer_options, label="κΈ°λλ¬Έ μ ν")
|
37 |
-
music_dropdown = gr.Dropdown(choices=music_options, label="
|
38 |
output_text = gr.Textbox(label="κΈ°λλ¬Έ")
|
39 |
-
output_html = gr.HTML(label="
|
40 |
|
41 |
interface = gr.Interface(
|
42 |
fn=show_prayer_and_music,
|
|
|
8 |
}
|
9 |
|
10 |
music_urls = {
|
11 |
+
"μμ
1": "https://huggingface.co/username/repository/resolve/main/music1.wav",
|
12 |
+
"μμ
2": "https://huggingface.co/username/repository/resolve/main/music2.wav",
|
13 |
+
"μμ
3": "https://huggingface.co/username/repository/resolve/main/music3.wav"
|
14 |
}
|
15 |
|
16 |
prayer_text = prayers.get(prayer_selection, "μ νλ κΈ°λκ° μμ΅λλ€.")
|
|
|
18 |
|
19 |
html_code = f"""
|
20 |
<audio id="background-music" controls autoplay loop>
|
21 |
+
<source src="{music_url}" type="audio/wav">
|
22 |
Your browser does not support the audio element.
|
23 |
</audio>
|
24 |
<style>
|
|
|
34 |
music_options = ["μμ
1", "μμ
2", "μμ
3"]
|
35 |
|
36 |
prayer_dropdown = gr.Dropdown(choices=prayer_options, label="κΈ°λλ¬Έ μ ν")
|
37 |
+
music_dropdown = gr.Dropdown(choices=music_options, label="λ°°κ²½μμ
μ ν")
|
38 |
output_text = gr.Textbox(label="κΈ°λλ¬Έ")
|
39 |
+
output_html = gr.HTML(label="λ°°κ²½μμ
")
|
40 |
|
41 |
interface = gr.Interface(
|
42 |
fn=show_prayer_and_music,
|