Eason918 commited on
Commit
bd1669a
·
verified ·
1 Parent(s): 006c053

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -5,6 +5,21 @@ from gtts import gTTS
5
  import os
6
  os.system("pip install transformers==4.36.2")
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  # 🎯 Load Hugging Face Models | 加載 Hugging Face 模型
9
  image_to_text_model = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
10
  story_generator = pipeline("text-generation", model="facebook/opt-350m", device=-1)
 
5
  import os
6
  os.system("pip install transformers==4.36.2")
7
 
8
+ # Beautify | UI 美化
9
+ page_bg_img = """
10
+ <style>
11
+ [data-testid="stAppViewContainer"] {
12
+ background-image: url("https://your-background-image-url.com");
13
+ background-size: cover;
14
+ }
15
+ h1, h3 {
16
+ text-align: center;
17
+ color: white;
18
+ }
19
+ </style>
20
+ """
21
+ st.markdown(page_bg_img, unsafe_allow_html=True)
22
+
23
  # 🎯 Load Hugging Face Models | 加載 Hugging Face 模型
24
  image_to_text_model = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
25
  story_generator = pipeline("text-generation", model="facebook/opt-350m", device=-1)