Spaces:
Runtime error
Runtime error
new
Browse files
app.py
CHANGED
@@ -10,9 +10,11 @@ import numpy as np
|
|
10 |
from langchain.embeddings import HuggingFaceEmbeddings
|
11 |
from langchain import HuggingFaceHub
|
12 |
from typing import Any, Dict, List
|
13 |
-
|
|
|
|
|
14 |
HUGGINGFACEHUB_API_TOKEN='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'
|
15 |
-
new_vectorstore = FAISS.load_local("./
|
16 |
llm = HuggingFaceHub(repo_id="declare-lab/flan-alpaca-large", model_kwargs={"temperature": 0.1, "max_length": 512},huggingfacehub_api_token= "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")
|
17 |
|
18 |
|
|
|
10 |
from langchain.embeddings import HuggingFaceEmbeddings
|
11 |
from langchain import HuggingFaceHub
|
12 |
from typing import Any, Dict, List
|
13 |
+
from InstructorEmbedding import INSTRUCTOR
|
14 |
+
from langchain.embeddings import HuggingFaceInstructEmbeddings
|
15 |
+
instructor_embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl")
|
16 |
HUGGINGFACEHUB_API_TOKEN='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'
|
17 |
+
new_vectorstore = FAISS.load_local("./faiss_docs_xl_index", embeddings)
|
18 |
llm = HuggingFaceHub(repo_id="declare-lab/flan-alpaca-large", model_kwargs={"temperature": 0.1, "max_length": 512},huggingfacehub_api_token= "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")
|
19 |
|
20 |
|