Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -60,23 +60,23 @@ def titanic(pclass, sex, age, fare, embarked, familysize, appellation, cabin):
|
|
60 |
|
61 |
# Cabin
|
62 |
if cabin == "A":
|
63 |
-
input_list.
|
64 |
elif cabin == "B":
|
65 |
-
input_list.
|
66 |
elif cabin == "C":
|
67 |
-
input_list.
|
68 |
elif cabin == "D":
|
69 |
-
input_list.
|
70 |
elif cabin == "E":
|
71 |
-
input_list.
|
72 |
elif cabin == "F":
|
73 |
-
input_list.
|
74 |
elif cabin == "G":
|
75 |
-
input_list.
|
76 |
elif cabin == "T":
|
77 |
-
input_list.
|
78 |
else:
|
79 |
-
input_list.
|
80 |
|
81 |
|
82 |
# 'res' is a list of predictions returned as the label.
|
|
|
60 |
|
61 |
# Cabin
|
62 |
if cabin == "A":
|
63 |
+
input_list.extend([1,0,0,0,0,0,0,0,0])
|
64 |
elif cabin == "B":
|
65 |
+
input_list.extend([0,1,0,0,0,0,0,0,0])
|
66 |
elif cabin == "C":
|
67 |
+
input_list.extend([0,0,1,0,0,0,0,0,0])
|
68 |
elif cabin == "D":
|
69 |
+
input_list.extend([0,0,0,1,0,0,0,0,0])
|
70 |
elif cabin == "E":
|
71 |
+
input_list.extend([0,0,0,0,1,0,0,0,0])
|
72 |
elif cabin == "F":
|
73 |
+
input_list.extend([0,0,0,0,0,1,0,0,0])
|
74 |
elif cabin == "G":
|
75 |
+
input_list.extend([0,0,0,0,0,0,1,0,0])
|
76 |
elif cabin == "T":
|
77 |
+
input_list.extend([0,0,0,0,0,0,0,1,0])
|
78 |
else:
|
79 |
+
input_list.extend([0,0,0,0,0,0,0,0,1])
|
80 |
|
81 |
|
82 |
# 'res' is a list of predictions returned as the label.
|