vishalned commited on
Commit
7f7b17b
1 Parent(s): ff86d49
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -28,7 +28,8 @@ def titanic(pclass, sex, age, sibsp, parch, fare, embarked):
28
  res = model.predict(np.asarray(input_list).reshape(1, -1))
29
  # We add '[0]' to the result of the transformed 'res', because 'res' is a list, and we only want
30
  # the first element.
31
- return res[0]
 
32
 
33
 
34
  demo = gr.Interface(
 
28
  res = model.predict(np.asarray(input_list).reshape(1, -1))
29
  # We add '[0]' to the result of the transformed 'res', because 'res' is a list, and we only want
30
  # the first element.
31
+ ret_str = "Survived" if res[0] == 1 else "Not survived"
32
+ return ret_str
33
 
34
 
35
  demo = gr.Interface(