Campfireman commited on
Commit
f12ccdb
1 Parent(s): c61b30e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -26,7 +26,7 @@ def titanic(pclass,sex,age,sibsp,parch,embarked,fare_per_customer,embarked_remap
26
  input_list.append(embarked_remapped)
27
  input_list.append(cabin_remapped)
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
 
32
  demo = gr.Interface(
@@ -43,8 +43,7 @@ demo = gr.Interface(
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.outputs.Textbox(self,type="auto",label=("This guy will"+("survive. " if res[0]==1 else "die. "))))
49
-
50
  demo.launch()
 
26
  input_list.append(embarked_remapped)
27
  input_list.append(cabin_remapped)
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
 
32
  demo = gr.Interface(
 
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
+ outputs=gr.outputs.Textbox(self,type="auto",label="Hi"))
48
+ #("This guy will"+("survive. " if res[0]==1 else "die. ")
49
  demo.launch()