Skip to content

Commit

Permalink
Update flask_app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinHsu1019 authored Nov 14, 2024
1 parent e4d6925 commit 8c68854
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Model/flask_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

@auth.verify_password
def verify_password(username, password):
""" Verify password for API Docs"""
if username in users and check_password_hash(users.get(username), password):
return username
return None
Expand Down Expand Up @@ -51,6 +52,7 @@ def verify_password(username, password):

@ns.route('/')
class HealthCheck(Resource):
"""Server health check."""
@api.doc('health_check')
def get(self):
"""Server health check."""
Expand All @@ -61,6 +63,7 @@ def get(self):

@ns.route('/chat')
class ChatBot(Resource):
"""retrieve and rank api entry point"""
@api.doc('chat_bot')
@api.expect(model)
def post(self):
Expand Down

0 comments on commit 8c68854

Please sign in to comment.