Spaces:
Runtime error
Runtime error
app_01
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ def predict(sex, age, pclass):
|
|
7 |
p = model.predict_proba([[sex, age, pclass]])[0]
|
8 |
return {"Did not survive": p[0], "Survived": p[1]}
|
9 |
|
10 |
-
demo = gr.
|
11 |
inputs=[gr.Dropdown(choices=["male", "female"], type="index"),
|
12 |
"number",
|
13 |
gr.Dropdown(choices=["1", "2", "3"], type="value")
|
|
|
7 |
p = model.predict_proba([[sex, age, pclass]])[0]
|
8 |
return {"Did not survive": p[0], "Survived": p[1]}
|
9 |
|
10 |
+
demo = gr.Interface(fn=predict,
|
11 |
inputs=[gr.Dropdown(choices=["male", "female"], type="index"),
|
12 |
"number",
|
13 |
gr.Dropdown(choices=["1", "2", "3"], type="value")
|