Leo Liu commited on
Commit
282620a
·
verified ·
1 Parent(s): cff93f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -11
app.py CHANGED
@@ -23,34 +23,38 @@ def text2audio(story_text):
23
 
24
 
25
  def main():
 
26
  st.set_page_config(page_title="Magic Storyteller", page_icon="🧚")
27
 
28
- # Optimize title area to attract children's attention
29
  st.markdown("""
30
  <style>
31
  @import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');
32
  .header {
33
- background-image: url('https://huggingface.co/spaces/Leo0129/classagm/resolve/main/background.jpg');
34
- background-size: cover;
35
  border-radius: 15px;
36
  padding: 2rem;
37
  text-align: center;
38
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
 
39
  }
40
- .header h1 {
41
- color: #FF9A6C;
42
  font-family: 'Comic Neue', cursive;
43
- font-size: 2.5rem;
44
- text-shadow: 2px 2px #FFF;
45
- margin-bottom: 0.5rem !important;
 
 
 
 
46
  }
47
-
48
  </style>
49
- """, unsafe_allow_html=True)
50
 
51
  st.markdown("""
52
  <div class="header">
53
- <h1>🪄 Magic Storyteller </h1>
 
54
  </div>
55
  """, unsafe_allow_html=True)
56
  uploaded_file = st.file_uploader("👉🏻 Upload your magic picture here...", type=["jpg", "png"])
 
23
 
24
 
25
  def main():
26
+ # Optimize title area to attract children's attention
27
  st.set_page_config(page_title="Magic Storyteller", page_icon="🧚")
28
 
29
+ # 优化UI样式
30
  st.markdown("""
31
  <style>
32
  @import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');
33
  .header {
34
+ background: linear-gradient(45deg, #FF9A6C, #FF6B6B);
 
35
  border-radius: 15px;
36
  padding: 2rem;
37
  text-align: center;
38
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
39
+ margin-bottom: 2rem;
40
  }
41
+ .subtitle {
 
42
  font-family: 'Comic Neue', cursive;
43
+ color: #4B4B4B;
44
+ font-size: 1.2rem;
45
+ margin: 1rem 0;
46
+ padding: 1rem;
47
+ background: rgba(255,255,255,0.9);
48
+ border-radius: 10px;
49
+ border-left: 5px solid #FF6B6B;
50
  }
 
51
  </style>
52
+ """, unsafe_allow_html=True)
53
 
54
  st.markdown("""
55
  <div class="header">
56
+ <h1 style='margin:0;'>🪄 Magic Storyteller</h1>
57
+ <p style='color: white; font-size: 1.2rem;'>Turn your pictures into magical stories!</p>
58
  </div>
59
  """, unsafe_allow_html=True)
60
  uploaded_file = st.file_uploader("👉🏻 Upload your magic picture here...", type=["jpg", "png"])