Spaces:
Build error
Build error
Leo Liu commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,10 @@
|
|
| 2 |
import streamlit as st
|
| 3 |
from transformers import pipeline
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
st.markdown("""
|
| 6 |
<style>
|
| 7 |
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');
|
|
@@ -43,7 +47,6 @@ def text2audio(story_text):
|
|
| 43 |
|
| 44 |
|
| 45 |
def main():
|
| 46 |
-
st.set_page_config(page_title="Magic Story Box", page_icon="🧚")
|
| 47 |
# 新版标题区
|
| 48 |
st.markdown("""
|
| 49 |
<div class="header">
|
|
|
|
| 2 |
import streamlit as st
|
| 3 |
from transformers import pipeline
|
| 4 |
|
| 5 |
+
# 必须作为第一个Streamlit命令出现
|
| 6 |
+
st.set_page_config(page_title="Magic Story Box", page_icon="🧚")
|
| 7 |
+
|
| 8 |
+
# CSS样式定义(保持在set_page_config之后)
|
| 9 |
st.markdown("""
|
| 10 |
<style>
|
| 11 |
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');
|
|
|
|
| 47 |
|
| 48 |
|
| 49 |
def main():
|
|
|
|
| 50 |
# 新版标题区
|
| 51 |
st.markdown("""
|
| 52 |
<div class="header">
|