Use Streamlit to Visualise your ML Models Running on Snowflake

Saša Mitrović
7 min readJul 4, 2022

Yeah, I know this is a lot. But, you will understand why I’m so hyped if you read my previous article “Building Snowflake applications using Streamlit”.

Let’s deconstruct this title. I’ve built an ML model using Tensorflow to predict a salary of an NBA player, based on years played. In this article I’m going to show you how to deploy the model to Snowflake as a Python UDF and how to run that model directly out of Snowflake using Streamlit so anyone can calculate their fantasy NBA salary.

What you’ll read about in this article:

· Help, I’m a Data Scientist and need to show my work to others
· Streamlit + Snowflake’s Snowpark
· Deploying a Keras model to Snowflake as Python UDF
· That’s not all!
· TL;DR

Help, I’m a Data Scientist and need to show my work to others

Let’s talk about Tracey. She is a data scientist specialising in machine learning. In the current sprint she is building a cool ML model. You guessed it — using this model she will be able to predict the salary of an NBA player, based on the years played.

She builds the model, finds it pretty cool and is eager to show it to the team, the product owner and the customers. But, she’s struggling to explain and show the results of her work. Why?

--

--