예제 #1
0
def after_input():
    query = request.form["equation"]
    titles = []
    try:
        temp = tui_jian.me_main(query)
        for item in temp:
            x_temp = item.strip().split("\t")
            t = x_temp[0]
            w = str(round(float(x_temp[1]) * 100, 2)) + "%"
            titles.append([t, w])
        return render_template("home.html", equation=query, ans_list=titles)
    except Exception as e:
        print(e)
        print("sth wrong")
        return render_template("home.html", equation="出错啦,啦啦啦", ans_list=[[]])
예제 #2
0
def home():
    return render_template("home.html")