VLegio commited on
Commit
b0f95bc
1 Parent(s): 860e573

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,8 +12,8 @@ model = RWKV(model=model_path, strategy='cpu bf16')
12
  pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
13
 
14
  def generate_prompt(context, question):
15
- instruction = instruction.strip().replace('\r\n','\n').replace('\n\n','\n').replace('\n\n','\n')
16
- input = input.strip().replace('\r\n','\n').replace('\n\n','\n').replace('\n\n','\n')
17
  return f"""CONTEXT:{context}
18
  QUESTION:{question}
19
  ANSWER:"""
 
12
  pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
13
 
14
  def generate_prompt(context, question):
15
+ context = context.strip().replace('\r\n','\n').replace('\n\n','\n').replace('\n\n','\n')
16
+ question = question.strip().replace('\r\n','\n').replace('\n\n','\n').replace('\n\n','\n')
17
  return f"""CONTEXT:{context}
18
  QUESTION:{question}
19
  ANSWER:"""