WickedFaith commited on
Commit
fbb08c5
·
verified ·
1 Parent(s): 9e04e9f

Update src/frontend/app.py

Browse files
Files changed (1) hide show
  1. src/frontend/app.py +9 -4
src/frontend/app.py CHANGED
@@ -1098,17 +1098,22 @@ 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
  fig.add_trace(go.Scatterpolar(
1103
- r=values,
1104
- theta=categories,
1105
  fill='toself',
1106
  name='Patient Values'
1107
  ))
1108
 
1109
  fig.update_layout(
1110
  polar=dict(radialaxis=dict(visible=True, range=[0, 1])),
1111
- showlegend=False
 
 
 
1112
  )
1113
 
1114
  st.plotly_chart(fig)
 
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(data=go.Scatterpolar(
1102
+ fill='toself'
1103
+ ))
1104
  fig.add_trace(go.Scatterpolar(
1105
+ r=list(radar_data.values()),
1106
+ theta=list(radar_data.keys()),
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)