Update app.py
Browse files
app.py
CHANGED
@@ -84,10 +84,10 @@ MODEL_NAME ="gpt-4"
|
|
84 |
#repo_id = "meta-llama/Llama-2-13b-chat-hf"
|
85 |
#repo_id = "HuggingFaceH4/zephyr-7b-alpha"
|
86 |
#repo_id = "meta-llama/Llama-2-70b-chat-hf"
|
87 |
-
|
88 |
#repo_id = "Vicuna-33b"
|
89 |
#repo_id = "alexkueck/ChatBotLI2Klein"
|
90 |
-
repo_id ="mistralai/Mistral-7B-v0.1"
|
91 |
|
92 |
|
93 |
################################################
|
@@ -174,9 +174,9 @@ def document_storage_mongodb(splits):
|
|
174 |
|
175 |
#dokumente in chroma db vektorisiert ablegen können - die Db vorbereiten daüfur
|
176 |
def document_retrieval_chroma(llm, prompt):
|
177 |
-
embeddings = OpenAIEmbeddings()
|
178 |
#Alternative Embedding - für Vektorstore, um Ähnlichkeitsvektoren zu erzeugen
|
179 |
-
|
180 |
db = Chroma(embedding_function = embeddings,
|
181 |
persist_directory = PATH_WORK + CHROMA_DIR)
|
182 |
|
|
|
84 |
#repo_id = "meta-llama/Llama-2-13b-chat-hf"
|
85 |
#repo_id = "HuggingFaceH4/zephyr-7b-alpha"
|
86 |
#repo_id = "meta-llama/Llama-2-70b-chat-hf"
|
87 |
+
repo_id = "tiiuae/falcon-40b "
|
88 |
#repo_id = "Vicuna-33b"
|
89 |
#repo_id = "alexkueck/ChatBotLI2Klein"
|
90 |
+
#repo_id ="mistralai/Mistral-7B-v0.1"
|
91 |
|
92 |
|
93 |
################################################
|
|
|
174 |
|
175 |
#dokumente in chroma db vektorisiert ablegen können - die Db vorbereiten daüfur
|
176 |
def document_retrieval_chroma(llm, prompt):
|
177 |
+
#embeddings = OpenAIEmbeddings()
|
178 |
#Alternative Embedding - für Vektorstore, um Ähnlichkeitsvektoren zu erzeugen
|
179 |
+
embeddings = HuggingFaceInstructEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2", model_kwargs={"device": "cpu"})
|
180 |
db = Chroma(embedding_function = embeddings,
|
181 |
persist_directory = PATH_WORK + CHROMA_DIR)
|
182 |
|