我成功地在我的localhost上运行了scikit学习预测模型,现在我有兴趣将这个模型添加到我的flask静态网站。我怎样才能做到这一点?有什么建议?我基本上想在flask静态网站上添加一个链接到预测模型。
例如
在localhost:5000上运行的静态网站具有以下代码
@app.route('/index')
def index():
return render_template('index.html')
`@app.route('/model')` #This code is wrong but I am trying to add my
`def model():` #model here
return url_for('localhost:8080')
@app.route('/contactus')
def contactus():
return render_template('contactus.html')