iarbel commited on
Commit
ba41c0a
1 Parent(s): 6c81c66

add env vars

Browse files
Files changed (2) hide show
  1. src/few_shot_funcs.py +2 -5
  2. src/scrape.py +2 -1
src/few_shot_funcs.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import re
2
  import openai
3
  import inflect
@@ -9,12 +10,8 @@ from langchain.embeddings.openai import OpenAIEmbeddings
9
  from langchain.vectorstores import FAISS
10
  from langchain.vectorstores.utils import DistanceStrategy
11
 
12
- import os
13
-
14
- OPENAI_KEY = ''
15
 
16
- openai.api_key = OPENAI_KEY
17
- os.environ['OPENAI_API_KEY'] = OPENAI_KEY
18
 
19
 
20
  # Constants
 
1
+ import os
2
  import re
3
  import openai
4
  import inflect
 
10
  from langchain.vectorstores import FAISS
11
  from langchain.vectorstores.utils import DistanceStrategy
12
 
 
 
 
13
 
14
+ openai.api_key = os.environ.get('OPENAI_KEY')
 
15
 
16
 
17
  # Constants
src/scrape.py CHANGED
@@ -1,10 +1,11 @@
1
  import re
 
2
  import requests
3
  from base64 import b64decode
4
  from bs4 import BeautifulSoup
5
  from typing import Dict
6
 
7
- Z_KEY = ''
8
 
9
 
10
  def zyte_call(url: str) -> bytes:
 
1
  import re
2
+ import os
3
  import requests
4
  from base64 import b64decode
5
  from bs4 import BeautifulSoup
6
  from typing import Dict
7
 
8
+ Z_KEY = os.environ.get('ZYTE_KEY')
9
 
10
 
11
  def zyte_call(url: str) -> bytes: