Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,8 @@ myurl = st.text_input("Give the URL to find a sustainability or annual report",
|
|
27 |
|
28 |
if st.button("Load this report "):
|
29 |
loader1 = PyPDFLoader(myurl)
|
30 |
-
|
|
|
31 |
index = VectorstoreIndexCreator(
|
32 |
# split the documents into chunks
|
33 |
text_splitter=CharacterTextSplitter(chunk_size=1000, chunk_overlap=0),
|
|
|
27 |
|
28 |
if st.button("Load this report "):
|
29 |
loader1 = PyPDFLoader(myurl)
|
30 |
+
langchainembeddings = OpenAIEmbeddings(deployment="textembedding", chunk_size=1)
|
31 |
+
|
32 |
index = VectorstoreIndexCreator(
|
33 |
# split the documents into chunks
|
34 |
text_splitter=CharacterTextSplitter(chunk_size=1000, chunk_overlap=0),
|