To display progress bar in shiny app, you need to use withProgress
function in server
as below:
withProgress(message = "Model is Training", value = 1.0, {
## Your code
})
So, you put your code inside this function and it will display the message "Model is training" while your code is running. value
in the function is a progress indicator in the app (1.0 is 100%). This you can set depending on computation. For example, you can set value = min + (max - min) * 0.1
. It needs not to be exactly like this. Anything that works for you which depend on the code. Setting value = 1.0
wouldn't hurt because it display the progress bar with its meaningful and relevant message in your case "Model is Training".
To get more info, visit this link: https://shiny.rstudio.com/reference/shiny/latest/withProgress.html