pablo-sampaio commited on
Commit
c5d9719
1 Parent(s): f503b75

Update match_info_crawler.py

Browse files
Files changed (1) hide show
  1. match_info_crawler.py +5 -2
match_info_crawler.py CHANGED
@@ -13,8 +13,11 @@ import re
13
  import google.generativeai as genai
14
 
15
 
16
- with open('KEY_GOOGLE_AI', 'r') as file:
17
- GOOGLE_API_KEY = file.read().replace('\n', '')
 
 
 
18
 
19
  genai.configure(api_key=GOOGLE_API_KEY)
20
 
 
13
  import google.generativeai as genai
14
 
15
 
16
+ if 'GOOGLE_API_KEY' in os.environ:
17
+ GOOGLE_API_KEY = os.environ['GOOGLE_API_KEY']
18
+ else:
19
+ with open('KEY_GOOGLE_AI', 'r') as file:
20
+ GOOGLE_API_KEY = file.read().replace('\n', '')
21
 
22
  genai.configure(api_key=GOOGLE_API_KEY)
23