Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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")
|