Spaces:
Sleeping
Sleeping
Update src/frontend/app.py
Browse files- src/frontend/app.py +11 -12
src/frontend/app.py
CHANGED
@@ -1098,22 +1098,19 @@ def show_diabetes_prediction():
|
|
1098 |
categories = ['Glucose', 'BMI', 'Age', 'Blood Pressure', 'Insulin', 'Family History']
|
1099 |
values = [glucose/300, bmi/50, age/100, blood_pressure/200, insulin/1000, diabetes_pedigree/3]
|
1100 |
|
1101 |
-
fig = go.Figure(
|
1102 |
-
|
1103 |
-
|
1104 |
fig.add_trace(go.Scatterpolar(
|
1105 |
-
r=
|
1106 |
-
theta=
|
1107 |
fill='toself',
|
1108 |
name='Patient Values'
|
1109 |
))
|
1110 |
|
1111 |
fig.update_layout(
|
1112 |
polar=dict(radialaxis=dict(visible=True, range=[0, 1])),
|
1113 |
-
showlegend=False
|
1114 |
-
margin=dict(l=0, r=40, t=20, b=20), # Adjust margins to shift graph left
|
1115 |
-
width=500,
|
1116 |
-
height=400
|
1117 |
)
|
1118 |
|
1119 |
st.plotly_chart(fig)
|
@@ -1435,7 +1432,9 @@ def show_liver_prediction():
|
|
1435 |
'A/G Balance': min(1, albumin_globulin_ratio / 2.5)
|
1436 |
}
|
1437 |
|
1438 |
-
fig = go.Figure(
|
|
|
|
|
1439 |
fig.add_trace(go.Scatterpolar(
|
1440 |
r=list(radar_data.values()),
|
1441 |
theta=list(radar_data.keys()),
|
@@ -1446,8 +1445,8 @@ def show_liver_prediction():
|
|
1446 |
fig.update_layout(
|
1447 |
polar=dict(radialaxis=dict(visible=True, range=[0, 1])),
|
1448 |
showlegend=False,
|
1449 |
-
margin=dict(l=
|
1450 |
-
width=
|
1451 |
height=400
|
1452 |
)
|
1453 |
|
|
|
1098 |
categories = ['Glucose', 'BMI', 'Age', 'Blood Pressure', 'Insulin', 'Family History']
|
1099 |
values = [glucose/300, bmi/50, age/100, blood_pressure/200, insulin/1000, diabetes_pedigree/3]
|
1100 |
|
1101 |
+
fig = go.Figure()
|
1102 |
+
|
1103 |
+
|
1104 |
fig.add_trace(go.Scatterpolar(
|
1105 |
+
r=values,
|
1106 |
+
theta=categories,
|
1107 |
fill='toself',
|
1108 |
name='Patient Values'
|
1109 |
))
|
1110 |
|
1111 |
fig.update_layout(
|
1112 |
polar=dict(radialaxis=dict(visible=True, range=[0, 1])),
|
1113 |
+
showlegend=False
|
|
|
|
|
|
|
1114 |
)
|
1115 |
|
1116 |
st.plotly_chart(fig)
|
|
|
1432 |
'A/G Balance': min(1, albumin_globulin_ratio / 2.5)
|
1433 |
}
|
1434 |
|
1435 |
+
fig = go.Figure(data=go.Scatterpolar(
|
1436 |
+
fill='toself'
|
1437 |
+
))
|
1438 |
fig.add_trace(go.Scatterpolar(
|
1439 |
r=list(radar_data.values()),
|
1440 |
theta=list(radar_data.keys()),
|
|
|
1445 |
fig.update_layout(
|
1446 |
polar=dict(radialaxis=dict(visible=True, range=[0, 1])),
|
1447 |
showlegend=False,
|
1448 |
+
margin=dict(l=0, r=40, t=20, b=20), # Adjust margins to shift graph left
|
1449 |
+
width=500,
|
1450 |
height=400
|
1451 |
)
|
1452 |
|