Spaces:
Sleeping
Sleeping
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)
|