Skip to content

Commit

Permalink
Deploy flask app using waitress.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindkerchief committed Jul 1, 2024
1 parent 1bba210 commit 3a61e5c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__pycache__
attendance/
faces/
test_faces/
Expand Down
5 changes: 3 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from cryptography.fernet import Fernet
from facenet_pytorch import InceptionResnetV1
from flask import Flask, render_template, Response, request, jsonify, send_file
from waitress import serve

app = Flask(__name__)
camera = None
Expand Down Expand Up @@ -471,5 +472,5 @@ def write_password(encrypted_password):
with open(PASSWORD_FILE, 'wb') as file:
file.write(encrypted_password)

if __name__ == '__main__':
app.run(host='0.0.0.0',port=5000,debug=False)
# if __name__ == '__main__':
# app.run(host='0.0.0.0', port=3000, debug=False)
Binary file modified requirements.txt
Binary file not shown.
1 change: 1 addition & 0 deletions run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
waitress-serve --listen=127.0.0.3:3000 app:app

0 comments on commit 3a61e5c

Please sign in to comment.