Campfireman commited on
Commit
fe3adbc
1 Parent(s): b76ecdb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -28,7 +28,7 @@ def titanic(pclass,sex,age,sibsp,parch,embarked,fare_per_customer,embarked_remap
28
  # 'res' is a list of predictions returned as the label.
29
  #global res
30
  res = model.predict(np.asarray(input_list).reshape(1, -1))
31
- return ("This guy will"+("survive. " if res[0]==1 else "die. ")
32
 
33
  demo = gr.Interface(
34
  fn=titanic,
@@ -44,7 +44,8 @@ demo = gr.Interface(
44
  gr.inputs.Number(default=1.0, label="embarked(C=1,S=2,Q=3)"),
45
  gr.inputs.Number(default=1.0, label="fare_per_customer"),
46
  gr.inputs.Number(default=1.0, label="cabin(if the passanger has one cabin =1, else =0)"),
47
- ],
 
48
  # outputs=gr.outputs.Textbox(self,type="auto",label="Hi"))
49
  #("This guy will"+("survive. " if res[0]==1 else "die. ")
50
  demo.launch()
 
28
  # 'res' is a list of predictions returned as the label.
29
  #global res
30
  res = model.predict(np.asarray(input_list).reshape(1, -1))
31
+ return {("This guy will"+("survive. " if res[0]==1 else "die. ")}
32
 
33
  demo = gr.Interface(
34
  fn=titanic,
 
44
  gr.inputs.Number(default=1.0, label="embarked(C=1,S=2,Q=3)"),
45
  gr.inputs.Number(default=1.0, label="fare_per_customer"),
46
  gr.inputs.Number(default=1.0, label="cabin(if the passanger has one cabin =1, else =0)"),
47
+ ]
48
+ )
49
  # outputs=gr.outputs.Textbox(self,type="auto",label="Hi"))
50
  #("This guy will"+("survive. " if res[0]==1 else "die. ")
51
  demo.launch()