Spaces:
Runtime error
Runtime error
temporaily changed how api key is handled
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
from openai import OpenAI
|
3 |
import glob
|
|
|
4 |
|
5 |
from langchain_community.vectorstores import Chroma
|
6 |
from langchain_core.output_parsers import StrOutputParser
|
@@ -12,9 +13,8 @@ from langchain_core.prompts import ChatPromptTemplate
|
|
12 |
|
13 |
from langchain_community.document_loaders import UnstructuredFileLoader
|
14 |
|
15 |
-
#OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
|
16 |
-
OPENAI_API_KEY = "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"
|
17 |
-
|
18 |
# Get all the filenames from the docs folder
|
19 |
files = glob.glob("./docs/*.txt")
|
20 |
|
|
|
1 |
import streamlit as st
|
2 |
from openai import OpenAI
|
3 |
import glob
|
4 |
+
import os
|
5 |
|
6 |
from langchain_community.vectorstores import Chroma
|
7 |
from langchain_core.output_parsers import StrOutputParser
|
|
|
13 |
|
14 |
from langchain_community.document_loaders import UnstructuredFileLoader
|
15 |
|
16 |
+
# OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
|
17 |
+
os.environ["OPENAI_API_KEY"] = "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"
|
|
|
18 |
# Get all the filenames from the docs folder
|
19 |
files = glob.glob("./docs/*.txt")
|
20 |
|