cwadayi commited on
Commit
8a37df3
·
verified ·
1 Parent(s): a9e83d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -29,9 +29,7 @@ professional_theme = gr.themes.Soft(
29
  block_radius="16px",
30
  block_shadow="0 4px 10px rgba(0, 0, 0, 0.08)",
31
 
32
- # === Tab Styling ===
33
- tabs_border_width="0px",
34
- tabs_border_color="transparent",
35
 
36
  # Unselected Tabs
37
  button_secondary_background_fill="transparent",
@@ -42,10 +40,7 @@ professional_theme = gr.themes.Soft(
42
  button_secondary_border_color="transparent",
43
  button_secondary_radius="8px",
44
 
45
- # --- CORRECTED: Removed the conflicting/repeated block for selected tabs ---
46
- # The 'button_primary' styles below will now apply to BOTH selected tabs and primary buttons.
47
-
48
- # === Primary Button Styling ===
49
  button_primary_background_fill="#005f73",
50
  button_primary_background_fill_hover="#0a9396",
51
  button_primary_text_color="white",
@@ -67,7 +62,7 @@ professional_theme = gr.themes.Soft(
67
  # --- Application startup logic (unchanged) ---
68
  try:
69
  count = get_and_update_visits()
70
- visit_count_html = f"🚀 **總載-入次數:** {count}"
71
  print(f"Application loaded. Total visits: {count}")
72
  except Exception as e:
73
  visit_count_html = "🚀 **總載入次數:** N/A"
@@ -79,3 +74,4 @@ demo = create_ui(visit_count_html, theme=professional_theme)
79
  # --- Launch the application ---
80
  if __name__ == "__main__":
81
  demo.launch()
 
 
29
  block_radius="16px",
30
  block_shadow="0 4px 10px rgba(0, 0, 0, 0.08)",
31
 
32
+ # CORRECTED: Removed invalid 'tabs_*' arguments
 
 
33
 
34
  # Unselected Tabs
35
  button_secondary_background_fill="transparent",
 
40
  button_secondary_border_color="transparent",
41
  button_secondary_radius="8px",
42
 
43
+ # === Primary Button Styling (also applies to selected tabs) ===
 
 
 
44
  button_primary_background_fill="#005f73",
45
  button_primary_background_fill_hover="#0a9396",
46
  button_primary_text_color="white",
 
62
  # --- Application startup logic (unchanged) ---
63
  try:
64
  count = get_and_update_visits()
65
+ visit_count_html = f"🚀 **總載入次數:** {count}"
66
  print(f"Application loaded. Total visits: {count}")
67
  except Exception as e:
68
  visit_count_html = "🚀 **總載入次數:** N/A"
 
74
  # --- Launch the application ---
75
  if __name__ == "__main__":
76
  demo.launch()
77
+