Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,8 @@ from langchain.chains import ConversationalRetrievalChain
|
|
| 18 |
from htmlTemplates import css, bot_template, user_template
|
| 19 |
from langchain.llms import HuggingFaceHub
|
| 20 |
|
|
|
|
|
|
|
| 21 |
|
| 22 |
def get_pdf_text(pdf_docs):
|
| 23 |
"""
|
|
@@ -151,8 +153,7 @@ def main():
|
|
| 151 |
|
| 152 |
st.write(css, unsafe_allow_html=True)
|
| 153 |
|
| 154 |
-
|
| 155 |
-
os.environ["HUGGINGFACEHUB_API_TOKEN"] = huggingface_token
|
| 156 |
|
| 157 |
if "conversation" not in st.session_state:
|
| 158 |
st.session_state.conversation = None
|
|
|
|
| 18 |
from htmlTemplates import css, bot_template, user_template
|
| 19 |
from langchain.llms import HuggingFaceHub
|
| 20 |
|
| 21 |
+
# set this key as an environment variable
|
| 22 |
+
os.environ["HUGGINGFACEHUB_API_TOKEN"] = st.secrets['huggingface_token']
|
| 23 |
|
| 24 |
def get_pdf_text(pdf_docs):
|
| 25 |
"""
|
|
|
|
| 153 |
|
| 154 |
st.write(css, unsafe_allow_html=True)
|
| 155 |
|
| 156 |
+
|
|
|
|
| 157 |
|
| 158 |
if "conversation" not in st.session_state:
|
| 159 |
st.session_state.conversation = None
|