Blazer is a particular favourite of mine. A former colleague taught herself SQL from zero knowledge by looking at and piecing together bits of other reports, experimenting with familiar (interesting) data and going on to build dashboards her team loved.
If we'd have just given the team a locked down Data Studio/PowerBI report none of that would have happened. Encouraging people to peek under the hood can be a huge benefit.
As suggested, encapsulate your prediction model in a web service, then calling it from Rails would be a good way to go.
An other way is to use something like Faktory (https://contribsys.com/faktory/) on top of Redis. You push jobs from Rails and then you pull them from Python to execute. Then Python can enqueue another job with the result which gets consumed by Rails (async callback).
I have the same experience with Sinatra and Rails. A small app in Sinatra grew larger than expected so we added gems basically recreating Rails... Lesson learnt, going with rails new now!