Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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('
|
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('
|
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"]
|