Exemplo n.º 1
0
def blood():
    weight = request.form['weight']
    age = request.form['age']
    print('몸무게 : {}, 나이 : {}'.format(weight, age))
    model = BloodModel('blood/data/data.txt')
    raw_data = model.create_raw_data()
    render_params = {}
    value = model.create_model(raw_data, weight, age)
    render_params['result'] = value
    return render_template('blood.html', **render_params)
Exemplo n.º 2
0
def blood():
    weight = request.form['weight']
    age = request.form['age']
    print("컨트롤러 아이디 {}, 비번 {}".format(weight, age))
    model = BloodModel('blood/data/data.txt')
    raw_data = model.create_raw_data()
    render_params = {}
    val = model.make_session(raw_data, weight, age)
    render_params['result'] = val
    return render_template('blood.html', **render_params)
Exemplo n.º 3
0
def blood():
    weight = request.args.get('weight', 'NONE')
    age = request.args.get('age', 'NONE')

    print("무게 : {}".format(weight))
    print("나이 : {}".format(age))
    model = BloodModel('blood/data/data.txt')
    raw_data = model.create_raw_data()
    render_params = {}
    value = model.create_model(raw_data, weight, age)

    render_params = {}
    render_params['result'] = value
    return render_template('blood.html', **render_params)
Exemplo n.º 4
0
def blood():
    weight = request.form['weight']
    age = request.form['age']
    # opcode = request.form['opcode']
    # print('계산기에 들어온 num1 = {}, num2 = {}, opcode = {}'.format(num1, num2, opcode))
    # c = CalcController(num1, num2, opcode)
    # result = c.calc()
    # render_params = {}
    # render_params['result'] = result
    print('몸무게: {}, 나이: {}'.format(weight, age))
    model = BloodModel('blood/data/data.txt')  # model이 학습을 한다
    raw_data =model.create_raw_data()
    render_params ={}
    value = model.create_model(raw_data,weight,age)
    render_params['result'] = value
    return render_template('blood.html', **render_params)
Exemplo n.º 5
0
 def __init__(self, weight, age):
     self._model = BloodModel()
     self._weight = weight
     self._age = age