Update app.py
Browse files
app.py
CHANGED
@@ -28,14 +28,13 @@ def predicter(SpO2, Age, Weight, Height, Temperature, Gender, Race):
|
|
28 |
pred = xgb_reg.predict_proba(user_input)
|
29 |
|
30 |
#return str(pred)
|
31 |
-
return {"
|
32 |
|
33 |
|
34 |
demo = gr.Interface(
|
35 |
fn=predicter,
|
36 |
inputs=[gr.Slider(0, 100),"number",gr.inputs.Number(label = "Weight in kg"),gr.inputs.Number(label = "Height in cm"),gr.inputs.Number(label = "Temperature in Celcius"),gr.Radio(["Male", "Female"]),gr.Radio(["White", "Black", "Asian", "Hispanic", "Other"])],
|
37 |
-
outputs=[gr.Label()],
|
38 |
-
|
39 |
-
title = "Model Predictions"
|
40 |
)
|
41 |
demo.launch()
|
|
|
28 |
pred = xgb_reg.predict_proba(user_input)
|
29 |
|
30 |
#return str(pred)
|
31 |
+
return {"No Hidden Hypoxemia": float(pred[0][0]), "Hidden Hypoxemia": float(pred[0][1])}
|
32 |
|
33 |
|
34 |
demo = gr.Interface(
|
35 |
fn=predicter,
|
36 |
inputs=[gr.Slider(0, 100),"number",gr.inputs.Number(label = "Weight in kg"),gr.inputs.Number(label = "Height in cm"),gr.inputs.Number(label = "Temperature in Celcius"),gr.Radio(["Male", "Female"]),gr.Radio(["White", "Black", "Asian", "Hispanic", "Other"])],
|
37 |
+
outputs=[gr.Label(label = "Probabilities")],
|
38 |
+
title = "Model Predictioned Probabilities"
|
|
|
39 |
)
|
40 |
demo.launch()
|