awacke1 commited on
Commit
f9d9bb9
·
1 Parent(s): 1e25101

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -299,7 +299,7 @@ def txt2chunks(text):
299
  return text_splitter.split_text(text)
300
 
301
  def vector_store(text_chunks):
302
- key = os.getenv('OPENAI_API_KEY')
303
  embeddings = OpenAIEmbeddings(openai_api_key=key)
304
  return FAISS.from_texts(texts=text_chunks, embedding=embeddings)
305
 
@@ -361,7 +361,7 @@ def get_zip_download_link(zip_file):
361
 
362
 
363
  def main():
364
- openai.api_key = os.getenv('OPENAI_API_KEY')
365
 
366
  # File type for output, model choice
367
  menu = ["txt", "htm", "xlsx", "csv", "md", "py"]
 
299
  return text_splitter.split_text(text)
300
 
301
  def vector_store(text_chunks):
302
+ key = os.getenv('OPENAI_KEY')
303
  embeddings = OpenAIEmbeddings(openai_api_key=key)
304
  return FAISS.from_texts(texts=text_chunks, embedding=embeddings)
305
 
 
361
 
362
 
363
  def main():
364
+ openai.api_key = os.getenv('OPENAI_KEY')
365
 
366
  # File type for output, model choice
367
  menu = ["txt", "htm", "xlsx", "csv", "md", "py"]