download spacy model firstly
Browse files
app.py
CHANGED
@@ -8,6 +8,10 @@ from langchain_community.embeddings import HuggingFaceInferenceAPIEmbeddings, Go
|
|
8 |
from langchain_community.vectorstores import Chroma
|
9 |
from langchain_core.prompts import PromptTemplate
|
10 |
|
|
|
|
|
|
|
|
|
11 |
template = """Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. Use three sentences maximum. Keep the answer as concise as possible. Always say "thanks for asking!" at the end of the answer.
|
12 |
Tips: Make sure to cite your sources, and use the exact words from the context.
|
13 |
{context}
|
|
|
8 |
from langchain_community.vectorstores import Chroma
|
9 |
from langchain_core.prompts import PromptTemplate
|
10 |
|
11 |
+
import spacy
|
12 |
+
|
13 |
+
spacy.cli.download("en_core_web_sm")
|
14 |
+
|
15 |
template = """Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. Use three sentences maximum. Keep the answer as concise as possible. Always say "thanks for asking!" at the end of the answer.
|
16 |
Tips: Make sure to cite your sources, and use the exact words from the context.
|
17 |
{context}
|