EliSafina commited on
Commit
0405d70
·
verified ·
1 Parent(s): 3dec0db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -11
app.py CHANGED
@@ -6,17 +6,20 @@ import time
6
  # Define the Streamlit app
7
  def main():
8
  st.title("Text to Speech Converter 💭")
9
-
10
- page_bg_img = '''
11
- <style>
12
- body {
13
- background-image: url("https://www.pixelstalk.net/wp-content/uploads/images6/Marble-Cute-Backgrounds-Blue-Abstract.jpg");
14
- background-size: cover;
15
- }
16
- </style>
17
- '''
18
 
19
- st.markdown(page_bg_img, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  # Text input
22
  text_input = st.text_area("Enter text to convert to speech📝", height=150)
@@ -61,7 +64,7 @@ def main():
61
  st.audio(audio_stream)
62
  else:
63
  # Display error message if no text input is provided
64
- st.error("Please enter text or upload a text file.")
65
 
66
  # Run the app
67
  if __name__ == "__main__":
 
6
  # Define the Streamlit app
7
  def main():
8
  st.title("Text to Speech Converter 💭")
 
 
 
 
 
 
 
 
 
9
 
10
+ st.markdown(
11
+ """
12
+ <style>
13
+ .reportview-container {
14
+ background: url("https://www.pixelstalk.net/wp-content/uploads/images6/Marble-Cute-Backgrounds-Blue-Abstract.jpg")
15
+ }
16
+ .sidebar .sidebar-content {
17
+ background: url("https://www.pixelstalk.net/wp-content/uploads/images6/Marble-Cute-Backgrounds-Blue-Abstract.jpg")
18
+ }
19
+ </style>
20
+ """,
21
+ unsafe_allow_html=True
22
+ )
23
 
24
  # Text input
25
  text_input = st.text_area("Enter text to convert to speech📝", height=150)
 
64
  st.audio(audio_stream)
65
  else:
66
  # Display error message if no text input is provided
67
+ st.warning("Please enter text or upload a text file.")
68
 
69
  # Run the app
70
  if __name__ == "__main__":