DrishtiSharma commited on
Commit
62835ea
·
verified ·
1 Parent(s): e0dc43f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -206,10 +206,11 @@ class DocumentRAG:
206
  if not self.qa_chain:
207
  return history + [("System", "Please process the documents first.")]
208
  try:
209
- preface = "f"""
210
- Instruction: Respond in {language}. Be professional and concise, keeping the response under 300 words.
211
- If you cannot provide an answer, say: "I am not sure about this question. Please try asking something else."
212
- """
 
213
  query = f"{preface}\nQuery: {question}"
214
 
215
  result = self.qa_chain({
 
206
  if not self.qa_chain:
207
  return history + [("System", "Please process the documents first.")]
208
  try:
209
+ preface = (
210
+ f"Instruction: Respond in {language}. Be professional and concise, "
211
+ f"keeping the response under 300 words. If you cannot provide an answer, say: "
212
+ f'"I am not sure about this question. Please try asking something else."'
213
+ )
214
  query = f"{preface}\nQuery: {question}"
215
 
216
  result = self.qa_chain({