captain-awesome
commited on
Commit
•
986e2b7
1
Parent(s):
d66d8de
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,11 @@ from langchain_community.document_loaders import WebBaseLoader
|
|
5 |
|
6 |
def get_response(user_input):
|
7 |
return "I dont know"
|
8 |
-
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# app config
|
11 |
st.set_page_config(page_title= "Chat with Websites", page_icon="🤖")
|
@@ -29,6 +33,11 @@ if (website_url is None or website_url == "") or (openai_apikey is None or opena
|
|
29 |
|
30 |
|
31 |
else:
|
|
|
|
|
|
|
|
|
|
|
32 |
#user_input
|
33 |
user_query = st.chat_input("Type your message here...")
|
34 |
if user_query is not None and user_query !="":
|
|
|
5 |
|
6 |
def get_response(user_input):
|
7 |
return "I dont know"
|
8 |
+
|
9 |
+
def get_vector_store_from_url(url):
|
10 |
+
loader = WebBaseLoader(url)
|
11 |
+
documents = loader.load()
|
12 |
+
return documents
|
13 |
|
14 |
# app config
|
15 |
st.set_page_config(page_title= "Chat with Websites", page_icon="🤖")
|
|
|
33 |
|
34 |
|
35 |
else:
|
36 |
+
|
37 |
+
documents = get_vector_store_from_url(website_url)
|
38 |
+
with st.sidebar:
|
39 |
+
st.write(documents)
|
40 |
+
|
41 |
#user_input
|
42 |
user_query = st.chat_input("Type your message here...")
|
43 |
if user_query is not None and user_query !="":
|