Modify to completed website

This commit is contained in:
Ray 2026-06-12 05:23:52 +00:00 • committed by GitHub
parent cff63fc9a5
commit c158252d02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

6
app.py
View file

@ -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()
app.run(debug=True)

Binary file not shown.