Solshine's picture
Update app.py
b56acb6 verified
raw
history blame
417 Bytes
import streamlit as st
from gtts import gTTS
from io import BytesIO
x = st.slider('Select a value')
slider_reply = x, 'squared is', x * x
st.write(slider_reply)
prompt = st.chat_input("Say something")
if prompt:
st.write(prompt)
with st.popover("Open popover"):
sound_file = BytesIO()
tts = gTTS(prompt, lang='en')
tts.write_to_fp(sound_file)
st.audio(sound_file)