Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def pdf_to_text(pdf_file, query):
|
|
31 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
32 |
texts = text_splitter.split_text(text)
|
33 |
|
34 |
-
embeddings =
|
35 |
#vector store
|
36 |
vectorstore = FAISS.from_texts(texts, embeddings)
|
37 |
llm = HuggingFaceHub(repo_id="google/flan-t5-xl", model_kwargs={"temperature":0, "max_length":512})
|
|
|
31 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
32 |
texts = text_splitter.split_text(text)
|
33 |
|
34 |
+
embeddings = HuggingFaceEmbeddings()
|
35 |
#vector store
|
36 |
vectorstore = FAISS.from_texts(texts, embeddings)
|
37 |
llm = HuggingFaceHub(repo_id="google/flan-t5-xl", model_kwargs={"temperature":0, "max_length":512})
|