abidlabs HF staff commited on
Commit
b6144ba
1 Parent(s): 1bb0c59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -57,7 +57,7 @@ def predict_survival(sex, age, fare):
57
  df = encode_fares(df)
58
  df = encode_ages(df)
59
  pred = clf.predict_proba(df)[0]
60
- return {'Perishes': pred[0], 'Survives': pred[1]}
61
 
62
  sex = gr.inputs.Radio(['female', 'male'], label="Sex")
63
  age = gr.inputs.Slider(minimum=0, maximum=120, default=22, label="Age")
 
57
  df = encode_fares(df)
58
  df = encode_ages(df)
59
  pred = clf.predict_proba(df)[0]
60
+ return {'Perishes': float(pred[0]), 'Survives': float(pred[1])}
61
 
62
  sex = gr.inputs.Radio(['female', 'male'], label="Sex")
63
  age = gr.inputs.Slider(minimum=0, maximum=120, default=22, label="Age")