import h2o
h2o.connect(url="http://ip:port", auth=('username','password'))
# 修改一:使用模型 model_id
model = h2o.get_model('model_id')
# 修改二:预测文件本机存放路径
data = h2o.upload_file('./sample.csv')
data['sur_hour'] = data['sur_hour'].asfactor()
result = model.predict(data)
result = data.concat([result])
# 修改三:预测结果保存路径
h2o.download_csv(result, './result.csv')