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 + "!!" | |
iface = gr.Interface(fn=greet, inputs="text", outputs="text") | |
iface.launch() |