Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,6 +59,8 @@ def get_text_chunks(text):
|
|
59 |
def get_vectorstore(text_chunks):
|
60 |
# embeddings = OpenAIEmbeddings()
|
61 |
model_name = "hkunlp/instructor-xl"
|
|
|
|
|
62 |
logger.info(f"Loading {model_name}")
|
63 |
embeddings = HuggingFaceInstructEmbeddings(model_name=model_name)
|
64 |
logger.info(f"Done loading {model_name}")
|
@@ -83,7 +85,6 @@ def get_conversation_chain(vectorstore):
|
|
83 |
return conversation_chain
|
84 |
|
85 |
|
86 |
-
|
87 |
def handle_userinput(user_question):
|
88 |
# st.session_state.conversation contains all the configuration from our vectorstore and memory.
|
89 |
response = st.session_state.conversation({'question': user_question})
|
|
|
59 |
def get_vectorstore(text_chunks):
|
60 |
# embeddings = OpenAIEmbeddings()
|
61 |
model_name = "hkunlp/instructor-xl"
|
62 |
+
model_name = "hkunlp/instructor-large"
|
63 |
+
model_name = "hkunlp/instructor-base"
|
64 |
logger.info(f"Loading {model_name}")
|
65 |
embeddings = HuggingFaceInstructEmbeddings(model_name=model_name)
|
66 |
logger.info(f"Done loading {model_name}")
|
|
|
85 |
return conversation_chain
|
86 |
|
87 |
|
|
|
88 |
def handle_userinput(user_question):
|
89 |
# st.session_state.conversation contains all the configuration from our vectorstore and memory.
|
90 |
response = st.session_state.conversation({'question': user_question})
|