back to white
Browse files
app.py
CHANGED
@@ -71,10 +71,10 @@ div align="center" style="padding: 20px 0; background-color: black; color: white
|
|
71 |
</div>
|
72 |
</div>
|
73 |
<div>
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
</div>
|
79 |
|
80 |
"""
|
@@ -153,82 +153,23 @@ MODALITY_PROMPTS = {
|
|
153 |
"OCT": ["edema"] }
|
154 |
|
155 |
CUSTOM_CSS = """
|
156 |
-
|
157 |
-
|
158 |
-
background-color: black !important;
|
159 |
-
}
|
160 |
-
.gradio-container, .gradio-container input, .gradio-container textarea, .gradio-container label, .gradio-container p {
|
161 |
-
color: #ffffff !important;
|
162 |
-
}
|
163 |
-
|
164 |
-
/* Input boxes and textareas */
|
165 |
-
.gradio-container input[type="text"],
|
166 |
-
.gradio-container textarea,
|
167 |
-
.gradio-container .gr-box,
|
168 |
-
.gradio-container .gr-input,
|
169 |
-
.gradio-container .gr-textarea {
|
170 |
-
background-color: #1a1a1a !important;
|
171 |
-
border: 1px solid #333 !important;
|
172 |
-
color: #ffffff !important;
|
173 |
-
}
|
174 |
-
|
175 |
-
/* Dropdowns */
|
176 |
-
.gradio-container select,
|
177 |
-
.gradio-container .gr-dropdown {
|
178 |
-
background-color: #1a1a1a !important;
|
179 |
-
border: 1px solid #333 !important;
|
180 |
-
color: #ffffff !important;
|
181 |
-
}
|
182 |
-
|
183 |
-
/* Buttons */
|
184 |
-
.gradio-container button,
|
185 |
-
.gradio-container .gr-button {
|
186 |
-
background-color: #32CD32 !important;
|
187 |
-
color: white !important;
|
188 |
-
border: none !important;
|
189 |
-
}
|
190 |
|
191 |
-
|
192 |
-
|
193 |
-
.gradio-container .gr-image-input {
|
194 |
-
background-color: #1a1a1a !important;
|
195 |
-
border: 2px dashed #333 !important;
|
196 |
-
}
|
197 |
-
|
198 |
-
/* Gallery */
|
199 |
-
.gradio-container .output-gallery,
|
200 |
-
.gradio-container .gr-gallery {
|
201 |
-
background-color: #1a1a1a !important;
|
202 |
-
}
|
203 |
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
border: 1px solid #333 !important;
|
208 |
-
}
|
209 |
-
.gradio-container .accordion-text {
|
210 |
-
color: #ffffff !important;
|
211 |
-
}
|
212 |
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
background-color: #1a1a1a !important;
|
217 |
-
color: #ffffff !important;
|
218 |
-
border: 1px solid #333 !important;
|
219 |
-
}
|
220 |
|
221 |
-
|
222 |
-
|
223 |
-
.gradio-container .gr-button:hover {
|
224 |
-
background-color: #28a745 !important;
|
225 |
-
}
|
226 |
|
227 |
-
/* Placeholder text */
|
228 |
-
.gradio-container input::placeholder,
|
229 |
-
.gradio-container textarea::placeholder {
|
230 |
-
color: #888888 !important;
|
231 |
-
}
|
232 |
"""
|
233 |
|
234 |
def on_mode_dropdown_change(selected_mode):
|
@@ -325,7 +266,7 @@ def process_image(image_path, text_prompts, modality):
|
|
325 |
return None, error_msg
|
326 |
|
327 |
# Define Gradio interface
|
328 |
-
with gr.Blocks() as demo:
|
329 |
gr.HTML(MARKDOWN)
|
330 |
with gr.Row():
|
331 |
with gr.Column():
|
|
|
71 |
</div>
|
72 |
</div>
|
73 |
<div>
|
74 |
+
<p style="font-size: 1.4em; line-height: 1.5; margin: 15px 0; text-align: left;">
|
75 |
+
This demo integrates BiomedParse, a foundation model for joint segmentation, detection, and recognition across 9 biomedical imaging modalities.
|
76 |
+
The model supports <span style="color: #FF4500;">CT</span>, <span style="color: #4169E1;">MRI</span>, <span style="color: #32CD32;">X-Ray</span>, <span style="color: #9370DB;">Pathology</span>, <span style="color: #FFD700;">Ultrasound</span>, <span style="color: #FF69B4;">Endoscope</span>, <span style="color: #20B2AA;">Fundus</span>, <span style="color: #FF8C00;">Dermoscopy</span>, and <span style="color: #8B008B;">OCT</span>.
|
77 |
+
</p>
|
78 |
</div>
|
79 |
|
80 |
"""
|
|
|
153 |
"OCT": ["edema"] }
|
154 |
|
155 |
CUSTOM_CSS = """
|
156 |
+
gradio-container {
|
157 |
+
background-color: black !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
|
159 |
+
gradio-container, .gradio-container input, .gradio-container textarea, .gradio-container label {
|
160 |
+
color: #ffffff !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
|
162 |
+
gradio-container button {
|
163 |
+
background-color: #32CD32 !important;
|
164 |
+
color: white !important;
|
|
|
|
|
|
|
|
|
|
|
165 |
|
166 |
+
gradio-container .accordion {
|
167 |
+
background-color: #1a1a1a !important;
|
168 |
+
border: 1px solid #333 !important;
|
|
|
|
|
|
|
|
|
169 |
|
170 |
+
gradio-container .output-gallery {
|
171 |
+
background-color: #1a1a1a !important;
|
|
|
|
|
|
|
172 |
|
|
|
|
|
|
|
|
|
|
|
173 |
"""
|
174 |
|
175 |
def on_mode_dropdown_change(selected_mode):
|
|
|
266 |
return None, error_msg
|
267 |
|
268 |
# Define Gradio interface
|
269 |
+
with gr.Blocks(css=CUSTOM_CSS) as demo:
|
270 |
gr.HTML(MARKDOWN)
|
271 |
with gr.Row():
|
272 |
with gr.Column():
|