FJDorfner commited on
Commit
9afb16d
·
verified ·
1 Parent(s): ae39e2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -23
app.py CHANGED
@@ -32,44 +32,59 @@ description_html = """
32
  </ul>
33
  </div>
34
  """
35
-
36
  css = """
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
- h1 {
39
- text-align: center;
40
- display: block;
 
 
 
 
 
41
  }
42
 
43
- .gradio-container .styled-block {
44
- background-color: #0b0f1a;
45
- color: white !important;
46
- padding: 10px;
47
- border-radius: 5px;
 
48
  box-shadow: 0 0 10px rgba(11,15,26,1);
49
- display: inline-flex;
50
  flex-direction: column;
51
- justify-content: center;
52
- align-items: center;
53
- margin: auto;
54
  }
55
 
56
- .gradio-container .styled-block ul,
57
- .gradio-container .styled-block ol {
58
- background-color: #1e2936;
59
  border-radius: 5px;
60
- color: white !important;
61
  padding: 10px;
62
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
63
- padding-left: 20px;
64
- text-align: left;
65
- list-style-position: inside;
66
  }
67
 
68
  footer {
69
- display: none !important;
70
  }
71
  """
72
-
73
  @spaces.GPU(duration=20)
74
  def predict_image(input_image, input_file):
75
 
@@ -116,7 +131,7 @@ def predict_image(input_image, input_file):
116
  with gr.Blocks(title="Anatomy Aware axSpA") as iface:
117
 
118
  gr.Markdown("# Anatomy-Aware Image Classification for radiographic axSpA")
119
- #gr.Markdown(description_markdown)
120
  gr.HTML(description_html)
121
 
122
 
 
32
  </ul>
33
  </div>
34
  """
 
35
  css = """
36
+ /* Existing CSS styles */
37
+ .markdown-block {
38
+ background-color: #0b0f1a !important; /* Light gray background */
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);
43
+ display: inline-flex; /* Use inline-flex to shrink to content size */
44
+ flex-direction: column;
45
+ justify-content: center; /* Vertically center content */
46
+ align-items: center; /* Horizontally center items within */
47
+ margin: auto; /* Center the block */
48
+ }
49
 
50
+ .markdown-block ul, .markdown-block ol {
51
+ background-color: #1e2936 !important;
52
+ border-radius: 5px;
53
+ padding: 10px;
54
+ box-shadow: 0 0 10px rgba(0,0,0,0.3);
55
+ padding-left: 20px; /* Adjust padding for bullet alignment */
56
+ text-align: left; /* Ensure text within list is left-aligned */
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)
89
  def predict_image(input_image, input_file):
90
 
 
131
  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