Spaces:
Runtime error
Runtime error
Commit
·
c10e123
1
Parent(s):
cd2b0f9
trying to add music
Browse files- app.py +2 -2
- webpage.py +8 -0
app.py
CHANGED
@@ -19,7 +19,7 @@ from game_content import (
|
|
19 |
import decider_utils
|
20 |
from decider_utils import YES, NO
|
21 |
from decider_questions import * # QUESTION_IS_USER_HOME, QUESTION_IS_USER_ENGAGED_WITH_BANDITS, etc.
|
22 |
-
from webpage import PAGE_STYLING_JS, PLEASE_BE_PATIENT_DIV, TOP_OF_SCREEN_PADDING_DIV
|
23 |
|
24 |
|
25 |
N_COMPLETIONS_WHEN_ELABORATING = 1 # I previously had this set to 3, but that made the program very slow.
|
@@ -166,7 +166,7 @@ with demo:
|
|
166 |
|
167 |
gr_n_turns_elapsed = gr.Textbox(label="N Turns Elapsed", value="0", interactive=False)
|
168 |
|
169 |
-
gr_music_player = gr.HTML(
|
170 |
|
171 |
gr_button1.click(
|
172 |
fn=run_1_game_turn, inputs=[gr_narr_transcript, gr_n_turns_elapsed, gr_user_transcript, gr_user_input], outputs=[gr_narr_transcript, gr_n_turns_elapsed, gr_user_transcript, gr_user_input]
|
|
|
19 |
import decider_utils
|
20 |
from decider_utils import YES, NO
|
21 |
from decider_questions import * # QUESTION_IS_USER_HOME, QUESTION_IS_USER_ENGAGED_WITH_BANDITS, etc.
|
22 |
+
from webpage import PAGE_STYLING_JS, PLEASE_BE_PATIENT_DIV, TOP_OF_SCREEN_PADDING_DIV, MUSIC_PLAYER
|
23 |
|
24 |
|
25 |
N_COMPLETIONS_WHEN_ELABORATING = 1 # I previously had this set to 3, but that made the program very slow.
|
|
|
166 |
|
167 |
gr_n_turns_elapsed = gr.Textbox(label="N Turns Elapsed", value="0", interactive=False)
|
168 |
|
169 |
+
gr_music_player = gr.HTML(MUSIC_PLAYER)
|
170 |
|
171 |
gr_button1.click(
|
172 |
fn=run_1_game_turn, inputs=[gr_narr_transcript, gr_n_turns_elapsed, gr_user_transcript, gr_user_input], outputs=[gr_narr_transcript, gr_n_turns_elapsed, gr_user_transcript, gr_user_input]
|
webpage.py
CHANGED
@@ -21,3 +21,11 @@ PLEASE_BE_PATIENT_DIV = """
|
|
21 |
After clicking Run Next Turn, please be patient as it may take up to a minute for the game state to update.
|
22 |
</div>
|
23 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
After clicking Run Next Turn, please be patient as it may take up to a minute for the game state to update.
|
22 |
</div>
|
23 |
"""
|
24 |
+
|
25 |
+
|
26 |
+
MUSIC_PLAYER = """
|
27 |
+
<div style="background-color: white; font-family: cursive; font-size: 19px; padding: 2px 17px;">
|
28 |
+
Optional: Click player below to play Nepali music.
|
29 |
+
<audio controls src="https://storage.cloud.google.com/public-file-hosting/NepaliFolkMusic.mp3"></audio>
|
30 |
+
</div>
|
31 |
+
"""
|