Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -138,22 +138,22 @@ st.markdown(
|
|
| 138 |
.big-title {
|
| 139 |
font-size: 36px !important;
|
| 140 |
font-weight: bold;
|
| 141 |
-
color:
|
| 142 |
text-align: center;
|
| 143 |
margin-top: 20px;
|
| 144 |
position: sticky; /* Pin the header */
|
| 145 |
top: 0;
|
| 146 |
-
background-color:
|
| 147 |
z-index: 100; /* Ensure it's above other content */
|
| 148 |
}
|
| 149 |
.sub-title {
|
| 150 |
font-size: 20px;
|
| 151 |
-
color:
|
| 152 |
text-align: center;
|
| 153 |
margin-bottom: 20px;
|
| 154 |
}
|
| 155 |
.stButton>button {
|
| 156 |
-
background-color:
|
| 157 |
color: white;
|
| 158 |
font-size: 16px;
|
| 159 |
width: 100%;
|
|
@@ -163,13 +163,16 @@ st.markdown(
|
|
| 163 |
.stTextArea textarea {
|
| 164 |
font-size: 16px;
|
| 165 |
min-height: 120px;
|
|
|
|
|
|
|
| 166 |
}
|
| 167 |
.result-box {
|
| 168 |
-
background-color:
|
| 169 |
padding: 20px;
|
| 170 |
border-radius: 10px;
|
| 171 |
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
| 172 |
margin-top: 20px;
|
|
|
|
| 173 |
}
|
| 174 |
.verdict {
|
| 175 |
font-size: 24px;
|
|
@@ -177,6 +180,7 @@ st.markdown(
|
|
| 177 |
margin: 0;
|
| 178 |
display: flex;
|
| 179 |
align-items: center;
|
|
|
|
| 180 |
}
|
| 181 |
.verdict-icon {
|
| 182 |
margin-right: 10px;
|
|
@@ -185,12 +189,12 @@ st.markdown(
|
|
| 185 |
div[data-baseweb="tab-list"] {
|
| 186 |
position: sticky;
|
| 187 |
top: 55px; /* Height of the header */
|
| 188 |
-
background-color:
|
| 189 |
z-index: 99;
|
| 190 |
}
|
| 191 |
/* Fix the sidebar content */
|
| 192 |
.stSidebar .sidebar-content {
|
| 193 |
-
background-color:
|
| 194 |
padding: 20px;
|
| 195 |
border-radius: 10px;
|
| 196 |
position: sticky;
|
|
@@ -199,7 +203,7 @@ st.markdown(
|
|
| 199 |
overflow-y: auto; /* Enable scrolling within the sidebar if content is too long */
|
| 200 |
}
|
| 201 |
.stSidebar .st-expander {
|
| 202 |
-
background-color:
|
| 203 |
border-radius: 10px;
|
| 204 |
padding: 10px;
|
| 205 |
margin-bottom: 10px;
|
|
@@ -332,9 +336,9 @@ with st.container():
|
|
| 332 |
details = ""
|
| 333 |
if show_details:
|
| 334 |
details = f"""
|
| 335 |
-
3-Class Probability: {result['prob3class']
|
| 336 |
3-Class Predicted Label: {['NEI', 'SUPPORTED', 'REFUTED'][result['pred_tc']]}
|
| 337 |
-
2-Class Probability: {result['prob2class']
|
| 338 |
2-Class Predicted Label: {['SUPPORTED', 'REFUTED'][result['pred_bc']] if isinstance(result['pred_bc'], int) and result['pred_tc'] != 0 else 'Not used'}
|
| 339 |
"""
|
| 340 |
|
|
|
|
| 138 |
.big-title {
|
| 139 |
font-size: 36px !important;
|
| 140 |
font-weight: bold;
|
| 141 |
+
color: var(--primary-color);
|
| 142 |
text-align: center;
|
| 143 |
margin-top: 20px;
|
| 144 |
position: sticky; /* Pin the header */
|
| 145 |
top: 0;
|
| 146 |
+
background-color: var(--background-color); /* Ensure the header covers content when scrolling */
|
| 147 |
z-index: 100; /* Ensure it's above other content */
|
| 148 |
}
|
| 149 |
.sub-title {
|
| 150 |
font-size: 20px;
|
| 151 |
+
color: var(--text-color);
|
| 152 |
text-align: center;
|
| 153 |
margin-bottom: 20px;
|
| 154 |
}
|
| 155 |
.stButton>button {
|
| 156 |
+
background-color: var(--primary-color);
|
| 157 |
color: white;
|
| 158 |
font-size: 16px;
|
| 159 |
width: 100%;
|
|
|
|
| 163 |
.stTextArea textarea {
|
| 164 |
font-size: 16px;
|
| 165 |
min-height: 120px;
|
| 166 |
+
background-color: var(--secondary-background-color);
|
| 167 |
+
color: var(--text-color);
|
| 168 |
}
|
| 169 |
.result-box {
|
| 170 |
+
background-color: var(--secondary-background-color);
|
| 171 |
padding: 20px;
|
| 172 |
border-radius: 10px;
|
| 173 |
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
| 174 |
margin-top: 20px;
|
| 175 |
+
color: var(--text-color);
|
| 176 |
}
|
| 177 |
.verdict {
|
| 178 |
font-size: 24px;
|
|
|
|
| 180 |
margin: 0;
|
| 181 |
display: flex;
|
| 182 |
align-items: center;
|
| 183 |
+
color: var(--text-color);
|
| 184 |
}
|
| 185 |
.verdict-icon {
|
| 186 |
margin-right: 10px;
|
|
|
|
| 189 |
div[data-baseweb="tab-list"] {
|
| 190 |
position: sticky;
|
| 191 |
top: 55px; /* Height of the header */
|
| 192 |
+
background-color: var(--background-color);
|
| 193 |
z-index: 99;
|
| 194 |
}
|
| 195 |
/* Fix the sidebar content */
|
| 196 |
.stSidebar .sidebar-content {
|
| 197 |
+
background-color: var(--secondary-background-color);
|
| 198 |
padding: 20px;
|
| 199 |
border-radius: 10px;
|
| 200 |
position: sticky;
|
|
|
|
| 203 |
overflow-y: auto; /* Enable scrolling within the sidebar if content is too long */
|
| 204 |
}
|
| 205 |
.stSidebar .st-expander {
|
| 206 |
+
background-color: var(--background-color);
|
| 207 |
border-radius: 10px;
|
| 208 |
padding: 10px;
|
| 209 |
margin-bottom: 10px;
|
|
|
|
| 336 |
details = ""
|
| 337 |
if show_details:
|
| 338 |
details = f"""
|
| 339 |
+
3-Class Probability: {result['prob3class']:.2f}
|
| 340 |
3-Class Predicted Label: {['NEI', 'SUPPORTED', 'REFUTED'][result['pred_tc']]}
|
| 341 |
+
2-Class Probability: {result['prob2class']:.2f}
|
| 342 |
2-Class Predicted Label: {['SUPPORTED', 'REFUTED'][result['pred_bc']] if isinstance(result['pred_bc'], int) and result['pred_tc'] != 0 else 'Not used'}
|
| 343 |
"""
|
| 344 |
|