diff --git a/app.py b/app.py index 699b985..0198c45 100644 --- a/app.py +++ b/app.py @@ -6,7 +6,7 @@ from flask import Flask BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -model_path = os.path.join(BASE_DIR, "model.pkl") +model_path = os.path.join(BASE_DIR, "models/main.pkl") # to get your model: joblib.dump(model, "model.pkl") model = joblib.load(model_path) @@ -54,8 +54,8 @@ def show_waiting_time(): # model = joblib.load({folder and model name}) prediction = model.predict(Xnp) - return render_template('WaitingTime.html', waittime=round(prediction[0])) + return render_template('WaitingTime.html', waittime=round(max(0,prediction[0]))) if __name__ == '__main__': - app.run() \ No newline at end of file + app.run(debug=True) \ No newline at end of file diff --git a/model.pkl b/models/main.pkl similarity index 50% rename from model.pkl rename to models/main.pkl index 2c912ca..e0fdde4 100644 Binary files a/model.pkl and b/models/main.pkl differ