Campfireman commited on
Commit
87a1ca2
1 Parent(s): ce8a91a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -28,13 +28,11 @@ def titanic(pclass,sex,age,sibsp,parch,embarked,fare_per_customer,embarked_remap
28
  input_list.append(cabin_remapped)
29
  # 'res' is a list of predictions returned as the label.
30
  res = model.predict(np.asarray(input_list).reshape(1, -1))
31
- # We add '[0]' to the result of the transformed 'res', because 'res' is a list, and we only want
32
- # the first element.
33
 
34
  demo = gr.Interface(
35
  fn=titanic,
36
  title="Titanic Predictive Analytics",
37
- description="Predict survivals.",
38
  allow_flagging="never",
39
  inputs=[
40
  gr.inputs.Number(default=1.0, label="pclass"),
@@ -44,7 +42,7 @@ demo = gr.Interface(
44
  gr.inputs.Number(default=1.0, label="parch"),
45
  gr.inputs.Number(default=1.0, label="embarked(C=1,S=2,Q=3)"),
46
  gr.inputs.Number(default=1.0, label="fare_per_customer"),
47
- gr.inputs.Number(default=1.0, label="cabin_remapped(if the passanger has one cabin =1, else =0)"),
48
 
49
  ],
50
  outputs=gr.Image(type="pil"))
 
28
  input_list.append(cabin_remapped)
29
  # 'res' is a list of predictions returned as the label.
30
  res = model.predict(np.asarray(input_list).reshape(1, -1))
 
 
31
 
32
  demo = gr.Interface(
33
  fn=titanic,
34
  title="Titanic Predictive Analytics",
35
+ description="Predict survivals. 0 for dead and 1 for survived. ",
36
  allow_flagging="never",
37
  inputs=[
38
  gr.inputs.Number(default=1.0, label="pclass"),
 
42
  gr.inputs.Number(default=1.0, label="parch"),
43
  gr.inputs.Number(default=1.0, label="embarked(C=1,S=2,Q=3)"),
44
  gr.inputs.Number(default=1.0, label="fare_per_customer"),
45
+ gr.inputs.Number(default=1.0, label="cabin(if the passanger has one cabin =1, else =0)"),
46
 
47
  ],
48
  outputs=gr.Image(type="pil"))