Convert to Flask app