Debmalya commited on
Commit
0baa9de
1 Parent(s): e8b5557
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ model = gr.inputs.Dropdown(list(compare_model_results['Model']),label="Model")
4
+ gender = gr.inputs.Dropdown(choices=["Male", "Female"],label = 'gender')
5
+ age = gr.inputs.Slider(minimum=1, maximum=100, default=data['age'].mean(), label = 'age')
6
+ hypertension = gr.inputs.Dropdown(choices=["1", "0"],label = 'hypertension')
7
+ heart_disease = gr.inputs.Dropdown(choices=["1", "0"],label ='heart_disease')
8
+ ever_married = gr.inputs.Dropdown(choices=["Yes", "No"], label ='ever_married')
9
+ work_type = gr.inputs.Dropdown(choices=["children", "Govt_job","Never_worked","Private","Self-employed"],label = 'work_type')
10
+ Residence_type = gr.inputs.Dropdown(choices=["Urban", "Rural"],label = 'Residence_type')
11
+ avg_glucose_level = gr.inputs.Slider(minimum=-55, maximum=300, default=data['avg_glucose_level'].mean(), label = 'avg_glucose_level')
12
+ bmi = gr.inputs.Slider(minimum=-10, maximum=100, default=data['bmi'].mean(), label = 'bmi')
13
+ smoking_status = gr.inputs.Dropdown(choices=["Unknown", "smokes","never_smoked", "formerly_smoked"], label ='smoking_status')
14
+
15
+ gr.Interface(predict,[model, gender, age, hypertension, heart_disease, ever_married, work_type, Residence_type, avg_glucose_level, bmi, smoking_status], "label",live=True).launch()
16
+