Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 {
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
/* --- Layout and Spacing --- */
|
| 74 |
-
#main_container {
|
| 75 |
-
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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:
|