Update app.py
Browse files
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("
|
31 |
-
|
|
|
32 |
|
33 |
|
34 |
-
prompt = st.chat_input("
|
35 |
if prompt:
|
36 |
st.write(prompt)
|
37 |
-
with st.popover("Open
|
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)
|