udituen commited on
Commit
0e448fc
·
1 Parent(s): 03c95e2

update the qa chain

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -2
src/streamlit_app.py CHANGED
@@ -4,7 +4,7 @@ from langchain_community.llms import HuggingFacePipeline
4
  from transformers import pipeline
5
  from langchain_community.embeddings import HuggingFaceEmbeddings
6
  from langchain_community.vectorstores import FAISS
7
- from langchain.prompts import ChatPromptTemplate
8
  from langchain.chains import create_retrieval_chain
9
  from langchain.chains.combine_documents import create_stuff_documents_chain
10
  from langchain_community.llms import Ollama
@@ -21,7 +21,7 @@ system_prompt = (
21
 
22
  )
23
 
24
- prompt = ChatPromptTemplate.from_template(
25
  "You are an agricultural research assistant. "
26
  "Use the given context to answer the question. "
27
  "If you don't know the answer, say you don't know.\n"
 
4
  from transformers import pipeline
5
  from langchain_community.embeddings import HuggingFaceEmbeddings
6
  from langchain_community.vectorstores import FAISS
7
+ from langchain.prompts import PromptTemplate
8
  from langchain.chains import create_retrieval_chain
9
  from langchain.chains.combine_documents import create_stuff_documents_chain
10
  from langchain_community.llms import Ollama
 
21
 
22
  )
23
 
24
+ prompt = PromptTemplate.from_template(
25
  "You are an agricultural research assistant. "
26
  "Use the given context to answer the question. "
27
  "If you don't know the answer, say you don't know.\n"