3zoozzn commited on
Commit
cd80951
1 Parent(s): 123a469

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ def predict(gender, age, hypertension, heart_disease, ever_married, work_type, r
18
  # Predict the stroke probability
19
  prediction = model.predict_proba(input_df)[0][1]
20
  # Return the prediction
21
- result = "The probability of stroke is {:.2f}%".format(prediction * 100) #to give a percentage
22
  return result
23
 
24
 
@@ -40,7 +40,7 @@ smoking_status = gr.inputs.Dropdown(
40
  # Create the interface
41
  inputs = [gender, age, hypertension, heart_disease, ever_married,
42
  work_type, residence_type, avg_glucose_level, bmi, smoking_status]
43
- outputs = gr.Lable(lable='Result')
44
 
45
  # Launch the interface
46
  demo = gr.Interface(fn=predict, inputs=inputs, outputs=outputs, title="Stroke Prediction",
 
18
  # Predict the stroke probability
19
  prediction = model.predict_proba(input_df)[0][1]
20
  # Return the prediction
21
+ result = "{:.2f}%".format(prediction * 100) #to give a percentage
22
  return result
23
 
24
 
 
40
  # Create the interface
41
  inputs = [gender, age, hypertension, heart_disease, ever_married,
42
  work_type, residence_type, avg_glucose_level, bmi, smoking_status]
43
+ outputs = gr.outputs.Label(label='Result')
44
 
45
  # Launch the interface
46
  demo = gr.Interface(fn=predict, inputs=inputs, outputs=outputs, title="Stroke Prediction",