ALYYAN commited on
Commit
8b84f95
·
verified ·
1 Parent(s): 5728995

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +50 -9
app.py CHANGED
@@ -64,17 +64,58 @@ async def refresh_history_table():
64
  # --- Gradio UI Definition ---
65
  css = """
66
  /* --- Professional Dark Theme & Fonts --- */
67
- :root { --primary-hue: 220 !important; --secondary-hue: 210 !important; --neutral-hue: 210 !important; --body-background-fill: #111827 !important; --block-background-fill: #1F2337 !important; --block-border-width: 1px !important; --border-color-accent: #374151 !important; --background-fill-secondary: #1F2937 !important;}
68
- /* --- Header & Title Styling --- */
69
- #app_header { text-align: center; max-width: 900px; margin: 0 auto; }
70
- #app_title { font-size: 3rem !important; font-weight: 800 !important; color: #FFFFFF !important; padding-top: 1rem; }
71
- #app_title p { text-align: center !important; } /* --- THIS IS THE FIX --- */
72
- #app_subtitle { font-size: 1.25rem !important; color: #9CA3AF !important; margin-bottom: 2rem; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  /* --- Layout and Spacing --- */
74
- #main_container { gap: 2rem; max-width: 700px; margin: 0 auto; }
75
- #results_gallery .gallery-item { padding: 0.25rem !important; background-color: #374151; border: 1px solid #374151 !important; }
76
- #bottom_controls { max-width: 500px; margin: 2.5rem auto 1rem auto; }
 
 
 
 
 
 
 
 
 
 
 
77
  """
 
78
  with gr.Blocks(theme=gr.themes.Default(primary_hue="blue", secondary_hue="blue"), css=css, title="Pneumonia Detection AI") as demo:
79
 
80
  with gr.Column() as main_app:
 
64
  # --- Gradio UI Definition ---
65
  css = """
66
  /* --- Professional Dark Theme & Fonts --- */
67
+ :root {
68
+ --primary-hue: 220 !important;
69
+ --secondary-hue: 210 !important;
70
+ --neutral-hue: 210 !important;
71
+ --body-background-fill: #111827 !important;
72
+ --block-background-fill: #1F2337 !important;
73
+ --block-border-width: 1px !important;
74
+ --border-color-accent: #374151 !important;
75
+ --background-fill-secondary: #1F2937 !important;
76
+ }
77
+
78
+ /* --- Header & Title Styling (Centered Fix) --- */
79
+ #app_header {
80
+ display: flex;
81
+ flex-direction: column;
82
+ align-items: center; /* ensures center horizontally */
83
+ justify-content: center;
84
+ max-width: 1000px;
85
+ margin: 0 auto;
86
+ text-align: center;
87
+ }
88
+ #app_title {
89
+ font-size: 3.2rem !important;
90
+ font-weight: 800 !important;
91
+ color: #FFFFFF !important;
92
+ padding-top: 1rem;
93
+ text-align: center; /* force center text */
94
+ }
95
+ #app_subtitle {
96
+ font-size: 1.25rem !important;
97
+ color: #9CA3AF !important;
98
+ margin-bottom: 2rem;
99
+ text-align: center;
100
+ }
101
+
102
  /* --- Layout and Spacing --- */
103
+ #main_container {
104
+ gap: 2rem;
105
+ max-width: 800px;
106
+ margin: 0 auto;
107
+ }
108
+ #results_gallery .gallery-item {
109
+ padding: 0.25rem !important;
110
+ background-color: #374151;
111
+ border: 1px solid #374151 !important;
112
+ }
113
+ #bottom_controls {
114
+ max-width: 500px;
115
+ margin: 2.5rem auto 1rem auto;
116
+ }
117
  """
118
+
119
  with gr.Blocks(theme=gr.themes.Default(primary_hue="blue", secondary_hue="blue"), css=css, title="Pneumonia Detection AI") as demo:
120
 
121
  with gr.Column() as main_app: