DeepVen commited on
Commit
292e068
1 Parent(s): 318fa37

Upload Index.py

Browse files
Files changed (1) hide show
  1. Index.py +3 -2
Index.py CHANGED
@@ -198,7 +198,7 @@ def _load_embeddings_from_db(
198
 
199
 
200
  def _prompt(question):
201
- return f"""Answer the following question using only the context below. Say 'no answer' when the question can't be answered.
202
  Question: {question}
203
  Context: """
204
 
@@ -227,7 +227,8 @@ def rag(domain: str, question: str):
227
  embeddings = _load_embeddings_from_db(db_exists, domain)
228
  # Create extractor instance
229
  #extractor = Extractor(embeddings, "google/flan-t5-base")
230
- extractor = Extractor(embeddings, repo_id="TheBloke/Llama-2-7B-GGUF", repo_type="llama-2-7b.Q4_K_M.gguf")
 
231
  # llm = HuggingFaceHub(
232
  # repo_id="google/flan-t5-xxl",
233
  # model_kwargs={"temperature": 1, "max_length": 1000000},
 
198
 
199
 
200
  def _prompt(question):
201
+ return f"""Answer the following question using only the context below. Say 'Could not find answer within the context' when the question can't be answered.
202
  Question: {question}
203
  Context: """
204
 
 
227
  embeddings = _load_embeddings_from_db(db_exists, domain)
228
  # Create extractor instance
229
  #extractor = Extractor(embeddings, "google/flan-t5-base")
230
+ #extractor = Extractor(embeddings, "TheBloke/Llama-2-7B-GGUF")
231
+ extractor = Extractor(embeddings, "google/flan-t5-xl")
232
  # llm = HuggingFaceHub(
233
  # repo_id="google/flan-t5-xxl",
234
  # model_kwargs={"temperature": 1, "max_length": 1000000},