Use Flask render_template instead of send_file.