Example #1
0
def predict_cabbage():

    ctrl = CabbageController()
    result = ctrl.service_model()
    render_params = {}
    render_params['result'] = result
    return render_template('cabbage.html', **render_params)
Example #2
0
def cabbage():
    avg_temp = request.form['avg_temp']
    min_temp = request.form['min_temp']
    max_temp = request.form['max_temp']
    rain_fall = request.form['rain_fall']
    c = CabbageController(avg_temp, min_temp, max_temp, rain_fall)
    result = c.service()
    render_params = {'result': result}
    return render_template('cabbage.html', **render_params)
Example #3
0
def predict_cabbage():
    avg_temp = request.form['avg_temp']
    min_temp = request.form['min_temp']
    max_temp = request.form['max_temp']
    rain_fall = request.form['rain_fall']
    ctrl = CabbageController(avg_temp, min_temp, max_temp, rain_fall)
    result = ctrl.service()
    render_params = {}
    render_params['result'] = result
    return render_template('cabbage.html', **render_params)
Example #4
0
def cabbage():
    #웹에서 사용자 입력값 받기
    avg_temp = request.form['avg_temp']
    min_temp = request.form['min_temp']
    max_temp = request.form['max_temp']
    rain_fall = request.form['rain_fall']
    #컨트롤러 생성시 받은 값 전달후 모델이 예측한 값 받기
    c = CabbageController(avg_temp, min_temp, max_temp, rain_fall)
    result = c.service()

    return render_template('cabbage.html', result=int(result))