我成功地在我的本地主機上運行scikit學習預測模型,現在我有興趣將此模型添加到我的燒瓶靜態網站。我怎樣才能做到這一點?有什麼建議麼?我基本上想在flask靜態網站上添加一個鏈接到預測模型。如何將scikit預測模型鏈接到flask靜態網站?
例如
靜態的網站在本地主機上運行: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')
顯示正是你想要與你的預測模型 –
做什麼,我想將它添加到@ app.route並創建一個標籤這就是我想要的做 – Waleed