Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
x = st.slider('Select a value')
|
| 4 |
+
st.write(x, 'squared is', x * x)
|
| 5 |
+
from gtts import gTTS
|
| 6 |
+
from io import BytesIO
|
| 7 |
+
sound_file = BytesIO()
|
| 8 |
+
tts = gTTS('Add text-to-speech to your app', lang='en')
|
| 9 |
+
tts.write_to_fp(sound_file)
|
| 10 |
+
|
| 11 |
+
st.audio(sound_file)
|