Rozeeeee commited on
Commit
71f577b
·
verified ·
1 Parent(s): fd42ef2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +52 -0
app.py CHANGED
@@ -7,6 +7,58 @@ import streamlit as st
7
  # 設定應用標題
8
  st.title("餐廳資料抓取與分析")
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  # 從 Google 試算表中讀取 URLs
11
  sheet_id = "1W20lawjiQtEpljUKoEaMVPDlSdnhvJLPUy2jk5xao_w"
12
  urls_df = pd.read_csv(f"https://docs.google.com/spreadsheets/d/{sheet_id}/export?format=csv")
 
7
  # 設定應用標題
8
  st.title("餐廳資料抓取與分析")
9
 
10
+ # 添加 CSS 樣式
11
+ st.markdown(
12
+ """
13
+ <style>
14
+ /* 全局樣式 */
15
+ body {
16
+ background-color: #f5f5f5;
17
+ color: #333;
18
+ font-family: 'Arial', sans-serif;
19
+ }
20
+
21
+ /* 標題樣式 */
22
+ .stApp h1 {
23
+ color: #2c3e50;
24
+ text-align: center;
25
+ font-size: 3em;
26
+ margin-top: 20px;
27
+ margin-bottom: 20px;
28
+ }
29
+
30
+ /* 表格樣式 */
31
+ .stApp .stDataFrame {
32
+ border: 2px solid #2c3e50;
33
+ border-radius: 10px;
34
+ margin-top: 20px;
35
+ }
36
+
37
+ /* 按鈕樣式 */
38
+ .stButton button {
39
+ background-color: #3498db;
40
+ color: white;
41
+ border: none;
42
+ border-radius: 5px;
43
+ padding: 10px 20px;
44
+ font-size: 16px;
45
+ margin-top: 20px;
46
+ cursor: pointer;
47
+ }
48
+
49
+ .stButton button:hover {
50
+ background-color: #2980b9;
51
+ }
52
+
53
+ /* 圖表標題樣式 */
54
+ .stApp .stPlotlyChart {
55
+ margin-top: 30px;
56
+ }
57
+ </style>
58
+ """,
59
+ unsafe_allow_html=True
60
+ )
61
+
62
  # 從 Google 試算表中讀取 URLs
63
  sheet_id = "1W20lawjiQtEpljUKoEaMVPDlSdnhvJLPUy2jk5xao_w"
64
  urls_df = pd.read_csv(f"https://docs.google.com/spreadsheets/d/{sheet_id}/export?format=csv")