awacke1 commited on
Commit
917b8ba
β€’
1 Parent(s): e8345f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -11
app.py CHANGED
@@ -18,14 +18,18 @@ def generate_speech_textarea(text_to_speak):
18
  </head>
19
  <body>
20
  <h1>πŸ”Š Read It Aloud</h1>
21
- <textarea id="textArea" rows="10" cols="80" readonly>
22
- {text_to_speak}
 
 
 
23
  </textarea>
24
  <br>
25
  <button onclick="readAloud()">πŸ”Š Read Aloud</button>
26
  </body>
27
  </html>
28
  '''
 
29
  components.html(documentHTML5, width=1280, height=1024)
30
 
31
  # Game list and associated icons
@@ -86,14 +90,6 @@ for i, (game, icon) in enumerate(zip(games, icons)):
86
 
87
  # ... Cut here for content change!
88
 
89
-
90
-
91
  if st.button(f"πŸ”Š Read {game}'s Strategies Aloud"):
92
  st.markdown(text_to_speak)
93
- generate_speech_textarea(text_to_speak)
94
- #st.markdown(text, unsafe_allow_html=True)
95
-
96
-
97
-
98
-
99
-
 
18
  </head>
19
  <body>
20
  <h1>πŸ”Š Read It Aloud</h1>
21
+ <textarea id="textArea" rows="10" cols="80" readonly>'''
22
+
23
+ documentHTML5 = documentHTML5 + text_to_speak
24
+
25
+ documentHTML5 = documentHTML5 + '''
26
  </textarea>
27
  <br>
28
  <button onclick="readAloud()">πŸ”Š Read Aloud</button>
29
  </body>
30
  </html>
31
  '''
32
+
33
  components.html(documentHTML5, width=1280, height=1024)
34
 
35
  # Game list and associated icons
 
90
 
91
  # ... Cut here for content change!
92
 
 
 
93
  if st.button(f"πŸ”Š Read {game}'s Strategies Aloud"):
94
  st.markdown(text_to_speak)
95
+ generate_speech_textarea(text_to_speak)