Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
Added error handling.
  • Loading branch information
Tyriek-cloud authored Oct 31, 2024
1 parent 2df999b commit 9cd0dc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def extract_images(url):

# Call Function to communicate with my Wit.ai app
def wit_ai_response(message):
access_token = 'WIT_AI_ACCESS_TOKEN'
access_token = os.getenv('WIT_AI_ACCESS_TOKEN')
if not access_token:
return 'Error: Access token is not set.'
headers = {
'Authorization': f'Bearer {access_token}'
}
Expand Down

0 comments on commit 9cd0dc3

Please sign in to comment.