Shreyas094 commited on
Commit
fcc9099
·
verified ·
1 Parent(s): ff847c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -517,7 +517,7 @@ def extract_answer(full_response, instructions=None):
517
  full_response = re.sub(instruction_pattern, "", full_response, flags=re.IGNORECASE | re.DOTALL)
518
 
519
  # Remove any remaining instruction-like phrases at the beginning of the response
520
- lines = full_response.split('\n')
521
  starters = ["answer:", "response:", "here's", "here is"]
522
  while lines and any(lines[0].strip().lower().startswith(starter) for starter in starters):
523
  lines.pop(0)
 
517
  full_response = re.sub(instruction_pattern, "", full_response, flags=re.IGNORECASE | re.DOTALL)
518
 
519
  # Remove any remaining instruction-like phrases at the beginning of the response
520
+ lines = full_response.split('\n')
521
  starters = ["answer:", "response:", "here's", "here is"]
522
  while lines and any(lines[0].strip().lower().startswith(starter) for starter in starters):
523
  lines.pop(0)