Variational measurement-based quantum computation for generative modeling