Update app.py
Browse files516 unmodified lines517518519520521522523524516 unmodified linesfull_response = re.sub(instruction_pattern, "", full_response, flags=re.IGNORECASE | re.DOTALL)# Remove any remaining instruction-like phrases at the beginning of the responselines = full_response.split('\n')while lines and any(line.strip().lower().startswith(starter) for starter in ["answer:", "response:", "here's", "here is"]):lines.pop(0)full_response = '\n'.join(lines)516 unmodified lines517518519520521522523524525516 unmodified linesfull_response = re.sub(instruction_pattern, "", full_response, flags=re.IGNORECASE | re.DOTALL)# Remove any remaining instruction-like phrases at the beginning of the responselines = full_response.split('\n')starters = ["answer:", "response:", "here's", "here is"]while lines and any(lines[0].strip().lower().startswith(starter) for starter in starters):lines.pop(0)full_response = '\n'.join(lines)
app.py+3-2