Update app.py
Browse files516 unmodified lines517518519520521522523516 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)516 unmodified lines517518519520521522523516 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)
app.py+1-1