awacke1 commited on
Commit
afeff3a
1 Parent(s): 805bd03

Update app.py

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