Streamlit
Deepnote allows you to create and run Streamlit apps directly from the notebook.
In order to run a Streamlit app, you will need to:
- Install Streamlit by creating a new code block in a notebook by the following code:
!pip install streamlit
- Create a Streamlit app using the following code:
Notice the
%%writefile app.py import streamlit as st st.title('Streamlit runs in Deepnote!')
%%writefile app.py
on the first line. Instead of executing the code directly, this only creates a file calledapp.py
with the rest of the block as its content. - Run the Streamlit app from the notebook:
!streamlit run app.py --server.port 8080
- Enable Incoming connections in your project.
- Open the url from the Incoming connections tooltip and you'll see the app running.