Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1140,9 +1140,9 @@ custom_css = """
|
|
1140 |
grid-template-columns: 2fr 1fr;
|
1141 |
gap: 15px;
|
1142 |
align-items: center;
|
1143 |
-
padding:
|
1144 |
border-bottom: 1px solid #f0f2f5;
|
1145 |
-
margin-bottom:
|
1146 |
}
|
1147 |
|
1148 |
.question-grid:last-child {
|
@@ -1158,29 +1158,6 @@ custom_css = """
|
|
1158 |
padding-right: 15px;
|
1159 |
}
|
1160 |
|
1161 |
-
.domain-header {
|
1162 |
-
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
|
1163 |
-
border: none;
|
1164 |
-
border-radius: 8px;
|
1165 |
-
padding: 15px 20px;
|
1166 |
-
margin: 20px 0 15px 0;
|
1167 |
-
text-align: center;
|
1168 |
-
}
|
1169 |
-
|
1170 |
-
.domain-title {
|
1171 |
-
color: #667eea;
|
1172 |
-
font-size: 16px;
|
1173 |
-
font-weight: 600;
|
1174 |
-
margin: 0 0 5px 0;
|
1175 |
-
}
|
1176 |
-
|
1177 |
-
.domain-description {
|
1178 |
-
color: #666;
|
1179 |
-
font-size: 13px;
|
1180 |
-
margin: 0;
|
1181 |
-
font-style: italic;
|
1182 |
-
}
|
1183 |
-
|
1184 |
/* Dropdown styling */
|
1185 |
.gr-dropdown {
|
1186 |
border-radius: 6px;
|
@@ -1194,9 +1171,9 @@ custom_css = """
|
|
1194 |
box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
|
1195 |
}
|
1196 |
|
1197 |
-
/*
|
1198 |
.question-section {
|
1199 |
-
margin-bottom:
|
1200 |
}
|
1201 |
|
1202 |
.question-section:last-child {
|
@@ -1215,7 +1192,7 @@ custom_css = """
|
|
1215 |
}
|
1216 |
"""
|
1217 |
|
1218 |
-
# Updated Gradio Interface with
|
1219 |
with gr.Blocks(
|
1220 |
title="🐶 Enhanced AI Dog Health Analyzer",
|
1221 |
theme=gr.themes.Soft(),
|
@@ -1301,31 +1278,23 @@ with gr.Blocks(
|
|
1301 |
maximum=25
|
1302 |
)
|
1303 |
|
1304 |
-
# Right Column -
|
1305 |
with gr.Column(scale=1):
|
1306 |
gr.HTML("""
|
1307 |
<div class="questionnaire-grid">
|
1308 |
<h2 style="color: #667eea; margin: 0 0 10px 0; text-align: center;">
|
1309 |
-
📋 HRQOL Assessment
|
1310 |
</h2>
|
1311 |
-
<p style="text-align: center; color: #666; font-style: italic; margin-bottom:
|
1312 |
Complete all questions for accurate healthspan analysis
|
1313 |
</p>
|
1314 |
""")
|
1315 |
|
1316 |
hrqol_inputs = []
|
1317 |
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
<div class="domain-header">
|
1322 |
-
<div class="domain-title">{domain_data['title']}</div>
|
1323 |
-
<div class="domain-description">{domain_data['description']}</div>
|
1324 |
-
</div>
|
1325 |
-
""")
|
1326 |
-
|
1327 |
-
# Create grid layout for questions
|
1328 |
-
with gr.Group(elem_classes=["question-section"]):
|
1329 |
for i, question in enumerate(domain_data["questions"]):
|
1330 |
with gr.Row():
|
1331 |
with gr.Column(scale=2):
|
@@ -1371,5 +1340,6 @@ with gr.Blocks(
|
|
1371 |
outputs=output_report
|
1372 |
)
|
1373 |
|
|
|
1374 |
if __name__ == "__main__":
|
1375 |
demo.launch()
|
|
|
1140 |
grid-template-columns: 2fr 1fr;
|
1141 |
gap: 15px;
|
1142 |
align-items: center;
|
1143 |
+
padding: 10px 0;
|
1144 |
border-bottom: 1px solid #f0f2f5;
|
1145 |
+
margin-bottom: 5px;
|
1146 |
}
|
1147 |
|
1148 |
.question-grid:last-child {
|
|
|
1158 |
padding-right: 15px;
|
1159 |
}
|
1160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1161 |
/* Dropdown styling */
|
1162 |
.gr-dropdown {
|
1163 |
border-radius: 6px;
|
|
|
1171 |
box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
|
1172 |
}
|
1173 |
|
1174 |
+
/* Compact spacing */
|
1175 |
.question-section {
|
1176 |
+
margin-bottom: 15px;
|
1177 |
}
|
1178 |
|
1179 |
.question-section:last-child {
|
|
|
1192 |
}
|
1193 |
"""
|
1194 |
|
1195 |
+
# Updated Gradio Interface with Removed Domain Headers
|
1196 |
with gr.Blocks(
|
1197 |
title="🐶 Enhanced AI Dog Health Analyzer",
|
1198 |
theme=gr.themes.Soft(),
|
|
|
1278 |
maximum=25
|
1279 |
)
|
1280 |
|
1281 |
+
# Right Column - Compact HRQOL Questionnaire
|
1282 |
with gr.Column(scale=1):
|
1283 |
gr.HTML("""
|
1284 |
<div class="questionnaire-grid">
|
1285 |
<h2 style="color: #667eea; margin: 0 0 10px 0; text-align: center;">
|
1286 |
+
📋 HRQOL Assessment
|
1287 |
</h2>
|
1288 |
+
<p style="text-align: center; color: #666; font-style: italic; margin-bottom: 20px;">
|
1289 |
Complete all questions for accurate healthspan analysis
|
1290 |
</p>
|
1291 |
""")
|
1292 |
|
1293 |
hrqol_inputs = []
|
1294 |
|
1295 |
+
# Create compact grid layout without domain headers
|
1296 |
+
with gr.Group(elem_classes=["question-section"]):
|
1297 |
+
for domain_key, domain_data in HRQOL_QUESTIONNAIRE.items():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1298 |
for i, question in enumerate(domain_data["questions"]):
|
1299 |
with gr.Row():
|
1300 |
with gr.Column(scale=2):
|
|
|
1340 |
outputs=output_report
|
1341 |
)
|
1342 |
|
1343 |
+
|
1344 |
if __name__ == "__main__":
|
1345 |
demo.launch()
|