Skip to content

Commit

Permalink
Add debugging mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya-mohammadi committed Jan 5, 2022
1 parent 0630254 commit a858feb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/base_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@

# define the app and the api variables
ENDPOINT = os.getenv('ENDPOINT', '/face')
HOST = "127.0.0.1"
# HOST = "0.0.0.0"
app = Flask(ENDPOINT)
api = Api(app)


PORT_NUMBER = int(os.getenv('PORT_NUMBER', 8080))

# get debugging mode condition, default is True:
debugging = os.getenv("DEBUGGING", 'True').lower() in ('true', '1', 't')
print(f"[INFO] debugging mode is set to: {debugging}")
# load the model and weights
FACE_DETECTION_MODEL = os.getenv('FACE_DETECTION_MODEL', 'MTCNNTorchFaceDetector')

Expand Down

0 comments on commit a858feb

Please sign in to comment.