Solshine commited on
Commit
0b298e3
β€’
1 Parent(s): 1bfa7fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -25,16 +25,16 @@ if uploaded_file is not None:
25
  sound_file = BytesIO()
26
  tts = gTTS(text, lang='en')
27
  tts.write_to_fp(sound_file)
28
- i = i + 1
29
  st.audio(sound_file)
30
- print("transcribed", i, "pages of", X, "total pages.")
31
-
 
32
 
33
 
34
- prompt = st.chat_input("Say something")
35
  if prompt:
36
  st.write(prompt)
37
- with st.popover("Open popover"):
38
  sound_file = BytesIO()
39
  tts = gTTS(prompt, lang='en')
40
  tts.write_to_fp(sound_file)
 
25
  sound_file = BytesIO()
26
  tts = gTTS(text, lang='en')
27
  tts.write_to_fp(sound_file)
 
28
  st.audio(sound_file)
29
+ print("Read aloud", i, "pages of", X, "total pages.")
30
+ i = i + 1
31
+ st.write("πŸŽ‰ That's the whole PDF! Have an awesome day! πŸŽ‰")
32
 
33
 
34
+ prompt = st.chat_input("Copy/Paste or type in text to have read aloud")
35
  if prompt:
36
  st.write(prompt)
37
+ with st.popover("✨ Open your text-to-speech from text input ✨"):
38
  sound_file = BytesIO()
39
  tts = gTTS(prompt, lang='en')
40
  tts.write_to_fp(sound_file)