Spaces:
Runtime error
Runtime error
Campfireman
commited on
Commit
•
b76ecdb
1
Parent(s):
f12ccdb
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,8 @@ 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 |
-
|
|
|
32 |
demo = gr.Interface(
|
33 |
fn=titanic,
|
34 |
title="Titanic Predictive Analytics",
|
@@ -44,6 +45,6 @@ demo = gr.Interface(
|
|
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()
|
|
|
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,
|
35 |
title="Titanic Predictive Analytics",
|
|
|
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()
|