Update app.py
Browse files
app.py
CHANGED
|
@@ -52,9 +52,6 @@ def serve_assets(path):
|
|
| 52 |
def serve_wishes(path):
|
| 53 |
return send_from_directory('data/wishes', path)
|
| 54 |
|
| 55 |
-
@app.route('/assets/<path:filename>')
|
| 56 |
-
def serve_audio(filename):
|
| 57 |
-
return send_from_directory('assets', filename, mimetype='audio/mp3')
|
| 58 |
|
| 59 |
class SimpleDB:
|
| 60 |
def __init__(self, reflections_path="data/reflections.json", wishes_path="data/wishes.json"):
|
|
@@ -950,42 +947,28 @@ def create_interface():
|
|
| 950 |
""")
|
| 951 |
|
| 952 |
# 커스텀 오디오 플레이어
|
| 953 |
-
|
| 954 |
-
|
| 955 |
-
|
| 956 |
-
|
| 957 |
-
|
| 958 |
-
|
| 959 |
-
|
| 960 |
-
|
| 961 |
-
|
| 962 |
-
|
| 963 |
-
|
| 964 |
-
|
| 965 |
-
|
| 966 |
-
|
| 967 |
-
|
| 968 |
-
|
| 969 |
-
|
| 970 |
-
|
| 971 |
-
|
| 972 |
-
|
| 973 |
-
|
| 974 |
-
|
| 975 |
-
.audio-player-container {
|
| 976 |
-
width: 100%;
|
| 977 |
-
margin: 20px auto;
|
| 978 |
-
text-align: center;
|
| 979 |
-
padding: 20px;
|
| 980 |
-
}
|
| 981 |
-
audio {
|
| 982 |
-
width: 100%;
|
| 983 |
-
max-width: 500px;
|
| 984 |
-
margin: 0 auto;
|
| 985 |
-
display: block;
|
| 986 |
-
}
|
| 987 |
-
</style>
|
| 988 |
-
""")
|
| 989 |
|
| 990 |
with gr.Column():
|
| 991 |
reflection_input = gr.Textbox(
|
|
@@ -1325,7 +1308,7 @@ def create_interface():
|
|
| 1325 |
)
|
| 1326 |
|
| 1327 |
enter_btn.click(
|
| 1328 |
-
fn=lambda: gr.
|
| 1329 |
outputs=tabs
|
| 1330 |
)
|
| 1331 |
|
|
|
|
| 52 |
def serve_wishes(path):
|
| 53 |
return send_from_directory('data/wishes', path)
|
| 54 |
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
class SimpleDB:
|
| 57 |
def __init__(self, reflections_path="data/reflections.json", wishes_path="data/wishes.json"):
|
|
|
|
| 947 |
""")
|
| 948 |
|
| 949 |
# 커스텀 오디오 플레이어
|
| 950 |
+
gr.Markdown("## 聽身, 請神 (몸의 소리를 듣고 신을 청하다) ")
|
| 951 |
+
gr.HTML("""
|
| 952 |
+
<div class="audio-player-container">
|
| 953 |
+
<audio controls autoplay style="width: 100%; max-width: 500px;">
|
| 954 |
+
<source src="/assets/main_music.mp3" type="audio/mpeg">
|
| 955 |
+
</audio>
|
| 956 |
+
</div>
|
| 957 |
+
<style>
|
| 958 |
+
.audio-player-container {
|
| 959 |
+
width: 100%;
|
| 960 |
+
margin: 20px auto;
|
| 961 |
+
text-align: center;
|
| 962 |
+
padding: 20px;
|
| 963 |
+
}
|
| 964 |
+
audio {
|
| 965 |
+
width: 100%;
|
| 966 |
+
max-width: 500px;
|
| 967 |
+
margin: 0 auto;
|
| 968 |
+
display: block;
|
| 969 |
+
}
|
| 970 |
+
</style>
|
| 971 |
+
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 972 |
|
| 973 |
with gr.Column():
|
| 974 |
reflection_input = gr.Textbox(
|
|
|
|
| 1308 |
)
|
| 1309 |
|
| 1310 |
enter_btn.click(
|
| 1311 |
+
fn=lambda: gr.update(selected=1), # 인덱스로 변경
|
| 1312 |
outputs=tabs
|
| 1313 |
)
|
| 1314 |
|