Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,14 +32,14 @@ def pdf_changes(pdf_doc):
|
|
| 32 |
|
| 33 |
llm=HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":1, "max_length":1000000})
|
| 34 |
global qa
|
| 35 |
-
qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=db.as_retriever(
|
| 36 |
return "Ready"
|
| 37 |
|
| 38 |
def book_changes(book):
|
| 39 |
db = FAISS.load_local( book , embeddings = HuggingFaceHubEmbeddings() )
|
| 40 |
llm=HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":1, "max_length":1000000})
|
| 41 |
global qa
|
| 42 |
-
qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=db.as_retriever(
|
| 43 |
return "Ready"
|
| 44 |
|
| 45 |
|
|
|
|
| 32 |
|
| 33 |
llm=HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":1, "max_length":1000000})
|
| 34 |
global qa
|
| 35 |
+
qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=db.as_retriever())
|
| 36 |
return "Ready"
|
| 37 |
|
| 38 |
def book_changes(book):
|
| 39 |
db = FAISS.load_local( book , embeddings = HuggingFaceHubEmbeddings() )
|
| 40 |
llm=HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":1, "max_length":1000000})
|
| 41 |
global qa
|
| 42 |
+
qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=db.as_retriever())
|
| 43 |
return "Ready"
|
| 44 |
|
| 45 |
|