Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -21,22 +21,13 @@ description_markdown = """
|
|
21 |
- **Privacy:** Please ensure data privacy and don't upload any sensitive patient information to this tool.
|
22 |
"""
|
23 |
|
24 |
-
description_html = """
|
25 |
-
<div style="background-color: #0b0f1a; color: white !important; padding: 10px; border-radius: 5px; box-shadow: 0 0 10px rgba(11,15,26,1); display: inline-flex; flex-direction: column; justify-content: center; align-items: center; margin: auto;">
|
26 |
-
<ul style="background-color: #1e2936; border-radius: 5px; color: white !important; padding: 10px; box-shadow: 0 0 10px rgba(0,0,0,0.3); padding-left: 20px; text-align: left; list-style-position: inside;">
|
27 |
-
<li>This tool combines a U-Net Segmentation Model with a ResNet-50 for Classification.</li>
|
28 |
-
<li><strong>Usage:</strong> Just drag a pelvic x-ray into the box and hit run.</li>
|
29 |
-
<li><strong>Process:</strong> The input image will be segmented and cropped to the SIJ before classification.</li>
|
30 |
-
<li><strong>Please Note:</strong> This tool is intended for research purposes only.</li>
|
31 |
-
<li><strong>Privacy:</strong> Please ensure data privacy and don't upload any sensitive patient information to this tool.</li>
|
32 |
-
</ul>
|
33 |
-
</div>
|
34 |
-
"""
|
35 |
css = """
|
36 |
-
|
|
|
|
|
|
|
37 |
.markdown-block {
|
38 |
-
background-color: #0b0f1a
|
39 |
-
color: black !important; /* Black text */
|
40 |
padding: 10px; /* Padding around the text */
|
41 |
border-radius: 5px; /* Rounded corners */
|
42 |
box-shadow: 0 0 10px rgba(11,15,26,1);
|
@@ -48,7 +39,7 @@ css = """
|
|
48 |
}
|
49 |
|
50 |
.markdown-block ul, .markdown-block ol {
|
51 |
-
background-color: #1e2936
|
52 |
border-radius: 5px;
|
53 |
padding: 10px;
|
54 |
box-shadow: 0 0 10px rgba(0,0,0,0.3);
|
@@ -57,32 +48,8 @@ css = """
|
|
57 |
list-style-position: inside;/* Ensures bullets/numbers are inside the content flow */
|
58 |
}
|
59 |
|
60 |
-
/* New custom CSS class for Gradio container */
|
61 |
-
.gradiocontainer-custom {
|
62 |
-
background-color: #0b0f1a !important; /* Custom background color */
|
63 |
-
color: black !important; /* Custom text color */
|
64 |
-
padding: 10px; /* Padding around the text */
|
65 |
-
border-radius: 5px; /* Rounded corners */
|
66 |
-
box-shadow: 0 0 10px rgba(11,15,26,1);
|
67 |
-
display: inline-flex; /* Use inline-flex to shrink to content size */
|
68 |
-
flex-direction: column;
|
69 |
-
justify-content: center; /* Vertically center content */
|
70 |
-
align-items: center; /* Horizontally center items within */
|
71 |
-
margin: auto; /* Center the block */
|
72 |
-
}
|
73 |
-
|
74 |
-
.gradiocontainer-custom ul, .gradiocontainer-custom ol {
|
75 |
-
background-color: #1e2936 !important;
|
76 |
-
border-radius: 5px;
|
77 |
-
padding: 10px;
|
78 |
-
box-shadow: 0 0 10px rgba(0,0,0,0.3);
|
79 |
-
padding-left: 20px; /* Adjust padding for bullet alignment */
|
80 |
-
text-align: left; /* Ensure text within list is left-aligned */
|
81 |
-
list-style-position: inside; /* Ensures bullets/numbers are inside the content flow */
|
82 |
-
}
|
83 |
-
|
84 |
footer {
|
85 |
-
display:none !important
|
86 |
}
|
87 |
"""
|
88 |
@spaces.GPU(duration=20)
|
@@ -132,7 +99,6 @@ with gr.Blocks(title="Anatomy Aware axSpA") as iface:
|
|
132 |
|
133 |
gr.Markdown("# Anatomy-Aware Image Classification for radiographic axSpA")
|
134 |
gr.Markdown(description_markdown, elem_classes="markdown-block")
|
135 |
-
gr.HTML(description_html)
|
136 |
|
137 |
|
138 |
with gr.Row():
|
|
|
21 |
- **Privacy:** Please ensure data privacy and don't upload any sensitive patient information to this tool.
|
22 |
"""
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
css = """
|
25 |
+
h1 {
|
26 |
+
text-align: center;
|
27 |
+
display:block;
|
28 |
+
}
|
29 |
.markdown-block {
|
30 |
+
background-color: #0b0f1a; /* Light gray background */
|
|
|
31 |
padding: 10px; /* Padding around the text */
|
32 |
border-radius: 5px; /* Rounded corners */
|
33 |
box-shadow: 0 0 10px rgba(11,15,26,1);
|
|
|
39 |
}
|
40 |
|
41 |
.markdown-block ul, .markdown-block ol {
|
42 |
+
background-color: #1e2936;
|
43 |
border-radius: 5px;
|
44 |
padding: 10px;
|
45 |
box-shadow: 0 0 10px rgba(0,0,0,0.3);
|
|
|
48 |
list-style-position: inside;/* Ensures bullets/numbers are inside the content flow */
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
footer {
|
52 |
+
display:none !important
|
53 |
}
|
54 |
"""
|
55 |
@spaces.GPU(duration=20)
|
|
|
99 |
|
100 |
gr.Markdown("# Anatomy-Aware Image Classification for radiographic axSpA")
|
101 |
gr.Markdown(description_markdown, elem_classes="markdown-block")
|
|
|
102 |
|
103 |
|
104 |
with gr.Row():
|