Spaces:
Runtime error
Runtime error
Update app.py
Browse filesAccess streamlit secrets
app.py
CHANGED
@@ -12,6 +12,12 @@ from langchain.text_splitter import CharacterTextSplitter
|
|
12 |
from langchain.vectorstores import Chroma
|
13 |
|
14 |
env_vars = dotenv_values(".env")
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
# prepare Falcon Huggingface API
|
17 |
llm = HuggingFaceEndpoint(
|
|
|
12 |
from langchain.vectorstores import Chroma
|
13 |
|
14 |
env_vars = dotenv_values(".env")
|
15 |
+
LOCAL=False
|
16 |
+
if not LOCAL:
|
17 |
+
env_vars = {
|
18 |
+
"HUGGINGFACE_API_TOKEN": st.secrets["HUGGINGFACE_API_TOKEN"],
|
19 |
+
"HUGGINGFACE_MODEL": st.secrets["HUGGINGFACE_MODEL"]
|
20 |
+
}
|
21 |
|
22 |
# prepare Falcon Huggingface API
|
23 |
llm = HuggingFaceEndpoint(
|