Looking at the Google docs for ViewModel, they show the below sample code on how to get a ViewModel:
ViewModel
val model = ViewModelProviders
You can use this instead:
viewModel= ViewModelProvider(this).get(YourViewModel::class.java)
"this" in the parentheses is the owner of YourViewModel instance.