vishwask commited on
Commit
6d9ed4f
1 Parent(s): 319f832

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -105,12 +105,12 @@ def load_model(_docs):
105
  streamer=streamer,)
106
  llm = HuggingFacePipeline(pipeline=text_pipeline, model_kwargs={"temperature": 0.1})
107
 
108
- # SYSTEM_PROMPT = ("Use the following pieces of context to answer the question at the end. "
109
- # "If you don't know the answer, just say that you don't know, "
110
- # "don't try to make up an answer.")
111
- SYSTEM_PROMPT = ("Use the following pieces of context along with general information you possess to answer the question at the end."
112
- "If you don't know the answer, just say that you don't know, "
113
- "don't try to make up an answer. Answer what is asked strictly and do not provide further questions at all.")
114
 
115
  template = generate_prompt("""{context} Question: {question} """,system_prompt=SYSTEM_PROMPT,) #Enter memory here!
116
  prompt = PromptTemplate(template=template, input_variables=["context", "question"]) #Add history here
 
105
  streamer=streamer,)
106
  llm = HuggingFacePipeline(pipeline=text_pipeline, model_kwargs={"temperature": 0.1})
107
 
108
+ SYSTEM_PROMPT = ("Use the following pieces of context to answer the question at the end. "
109
+ "If you don't know the answer, just say that you don't know, "
110
+ "don't try to make up an answer.")
111
+ # SYSTEM_PROMPT = ("Use the following pieces of context along with general information you possess to answer the question at the end."
112
+ # "If you don't know the answer, just say that you don't know, "
113
+ # "don't try to make up an answer. Answer what is asked strictly and do not provide further questions at all.")
114
 
115
  template = generate_prompt("""{context} Question: {question} """,system_prompt=SYSTEM_PROMPT,) #Enter memory here!
116
  prompt = PromptTemplate(template=template, input_variables=["context", "question"]) #Add history here