Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
# pip install streamlit langchain lanchain-openai beautifulsoup4 python-dotenv chromadb
|
2 |
|
|
|
3 |
import streamlit as st
|
4 |
from langchain_core.messages import AIMessage, HumanMessage
|
5 |
from langchain_community.document_loaders import WebBaseLoader
|
@@ -14,8 +15,7 @@ from langchain.chains import create_history_aware_retriever, create_retrieval_ch
|
|
14 |
from langchain.chains.combine_documents import create_stuff_documents_chain
|
15 |
|
16 |
|
17 |
-
|
18 |
-
|
19 |
def get_vectorstore_from_url(url):
|
20 |
# get the text in document form
|
21 |
loader = WebBaseLoader(url)
|
|
|
1 |
# pip install streamlit langchain lanchain-openai beautifulsoup4 python-dotenv chromadb
|
2 |
|
3 |
+
import os
|
4 |
import streamlit as st
|
5 |
from langchain_core.messages import AIMessage, HumanMessage
|
6 |
from langchain_community.document_loaders import WebBaseLoader
|
|
|
15 |
from langchain.chains.combine_documents import create_stuff_documents_chain
|
16 |
|
17 |
|
18 |
+
os.getenv('HUGGINGFACEHUB_API_TOKEN')
|
|
|
19 |
def get_vectorstore_from_url(url):
|
20 |
# get the text in document form
|
21 |
loader = WebBaseLoader(url)
|