A Flow-Based Generative Model for Rare-Event Simulation