abidlabs HF staff commited on
Commit
50b9c9c
1 Parent(s): 5958d99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -59,9 +59,9 @@ def predict_survival(sex, age, fare):
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")
64
- fare = gr.inputs.Slider(minimum=0, maximum=200, default=100, label="Fare (british pounds)")
65
 
66
  gr.Interface(predict_survival, [sex, age, fare], "label", live=True, thumbnail="https://raw.githubusercontent.com/gradio-app/hub-titanic/master/thumbnail.png", analytics_enabled=False,
67
  theme="soft", title="Surviving the Titanic", description="What is the probability that a passenger on the Titanic would survive the famous wreck? It depends on their demographics as this live interface demonstrates.").launch();
59
  pred = clf.predict_proba(df)[0]
60
  return {'Perishes': float(pred[0]), 'Survives': float(pred[1])}
61
 
62
+ sex = gr.Radio(['female', 'male'], label="Sex", value="male")
63
+ age = gr.Slider(minimum=0, maximum=120, default=22, label="Age")
64
+ fare = gr.Slider(minimum=0, maximum=200, default=100, label="Fare (british pounds)")
65
 
66
  gr.Interface(predict_survival, [sex, age, fare], "label", live=True, thumbnail="https://raw.githubusercontent.com/gradio-app/hub-titanic/master/thumbnail.png", analytics_enabled=False,
67
  theme="soft", title="Surviving the Titanic", description="What is the probability that a passenger on the Titanic would survive the famous wreck? It depends on their demographics as this live interface demonstrates.").launch();