| | |
| | |
| |
|
| | |
| |
|
| |
|
| | |
| | import gradio as gr |
| | from joblib import load |
| |
|
| | model = load("model.joblib") |
| |
|
| | def prediction(pclass,sex,age,parch,fare): |
| | |
| | inp = [[pclass,sex,age,parch,fare]] |
| | |
| | pre = model.predict(inp)[0] |
| | |
| | return "Alive" if pre==1 else "Dead" |
| | |
| |
|
| | iface = gr.Interface( |
| | fn = prediction, |
| | inputs = [gr.Number(label="Passenger Class"), |
| | gr.Number(label="Gender (0:Male,1:Female)"), |
| | gr.Number(label="Age"), |
| | gr.Number(label="No. of People"), |
| | gr.Number(label="Fare")], |
| | |
| | outputs = "text", |
| | title = "Survival Possibility", |
| | description = "This is a calculator which tells you the Alive/Dead possibility.") |
| |
|
| | iface.launch() |
| |
|
| |
|
| | |
| |
|
| |
|
| |
|
| |
|
| |
|