Added Flask and function to insert score