Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,14 +30,14 @@ def pdf_changes(pdf_doc):
|
|
| 30 |
embeddings = HuggingFaceHubEmbeddings()
|
| 31 |
db = FAISS.from_documents(docs, embeddings)
|
| 32 |
|
| 33 |
-
llm=HuggingFaceHub(repo_id="google/flan-
|
| 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-
|
| 41 |
global qa
|
| 42 |
qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=db.as_retriever())
|
| 43 |
return "Ready"
|
|
|
|
| 30 |
embeddings = HuggingFaceHubEmbeddings()
|
| 31 |
db = FAISS.from_documents(docs, embeddings)
|
| 32 |
|
| 33 |
+
llm=HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":0.1, "max_new_tokens":250})
|
| 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":0.1, "max_new_tokens":250})
|
| 41 |
global qa
|
| 42 |
qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=db.as_retriever())
|
| 43 |
return "Ready"
|