pulse_ox / app.py
zonova's picture
Update app.py
e022594
import gradio as gr
import xgboost
import pandas as pd
import numpy as np
xgb_reg = xgboost.XGBClassifier(tree_method = 'approx',
enable_categorical = True,
learning_rate=.1,
max_depth=2,
n_estimators=70,
early_stopping_rounds = 0,
scale_pos_weight=1)
xgb_reg.load_model('classifier_fewer_features_HH.json')
def greet(name):
return "Hello " + name + "!!"
def predict(SpO2, Age, Weight, Height, Temperature, Gender, Race)
demo = gr.Interface(
fn=greet,
inputs=[gr.Slider(0, 100),"number","number","number",gr.Radio(["Male", "Female"]),gr.Radio(["White", "Black", "Asian", "Hispanic", "Other"])],
outputs=["text", "number"],
)
demo.launch()