Solshine commited on
Commit
e2bb816
1 Parent(s): cc84c76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -5,8 +5,10 @@ from io import BytesIO
5
  x = st.slider('Select a value')
6
  st.write(x, 'squared is', x * x)
7
 
8
- sound_file = BytesIO()
9
- tts = gTTS('Add text-to-speech to your app', lang='en')
10
- tts.write_to_fp(sound_file)
11
-
12
- st.audio(sound_file)
 
 
 
5
  x = st.slider('Select a value')
6
  st.write(x, 'squared is', x * x)
7
 
8
+ prompt = st.chat_input("Say something")
9
+ if prompt:
10
+ sound_file = BytesIO()
11
+ tts = gTTS('Add text-to-speech to your app', lang='en')
12
+ tts.write_to_fp(sound_file)
13
+
14
+ st.audio(sound_file)