Spaces:
Runtime error
Runtime error
Commit
·
18b4b80
1
Parent(s):
b1ecb1f
Update app.py
Browse files
app.py
CHANGED
@@ -53,10 +53,13 @@ def get_vectorstore(text_chunks):
|
|
53 |
vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
|
54 |
return vectorstore
|
55 |
|
|
|
|
|
|
|
56 |
def get_conversation_chain(vectorstore):
|
57 |
#llm = OpenAI()
|
58 |
#llm = ChatOpenAI()
|
59 |
-
llm = HuggingFaceHub(repo_id="
|
60 |
memory = ConversationBufferMemory(memory_key='chat_history', return_messages=True)
|
61 |
conversation_chain = ConversationalRetrievalChain.from_llm(
|
62 |
llm=llm,
|
|
|
53 |
vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
|
54 |
return vectorstore
|
55 |
|
56 |
+
|
57 |
+
# google/flan-t5-xxl
|
58 |
+
|
59 |
def get_conversation_chain(vectorstore):
|
60 |
#llm = OpenAI()
|
61 |
#llm = ChatOpenAI()
|
62 |
+
llm = HuggingFaceHub(repo_id="bigscience/bloom", model_kwargs={"temperature":0.5, "max_length":512})
|
63 |
memory = ConversationBufferMemory(memory_key='chat_history', return_messages=True)
|
64 |
conversation_chain = ConversationalRetrievalChain.from_llm(
|
65 |
llm=llm,
|