Skip to content

fastforwardlabs/cml_streamlit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CML Streamlit

A minimal example of a Streamlit application running as a CML or CDSW Application. We'll refer only to CML from here on out, but the instructions are exactly the same for CDSW.

Instructions

Create a new CML project from git, or otherwise clone this repo into a CML project.

Open a Python 3 session in CML.

Install Streamlit by running !pip3 install -r requirements.txt in the Python REPL to the right.

There are two scripts relevant to running Streamlit as a CML Application:

app.py        # this is the streamlit app itself
launcher.py   # this is the script we pass to the CML Application to launch our app

Create a new Application by navigating to the Applications pane on the left. Fill in the details similarly to the screenshot below.

Creating a new streamlit application

Once the Application has been created, you can launch it from the Applications pane. This should open a browser window, with a Streamlit application running at a URL something like streamlit-demo.cml.your-organization.com.

If everything worked, you should see something like this:

A working streamlit app

To develop the Streamlit app, return to the Python 3 session, and hack away. Hot reloading of the app on save should work.

Happy hacking!

About

A minimal example of a Streamlit application running as a CML or CDSW Application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages