Streamlit
Creating a Streamlit Live App on MINEO is a simple and efficient way to deploy interactive web applications. Follow the steps below to set up your own Streamlit Live App:
Step 1: Create the app.py File
Start by creating a file named app.py in your project directory. Remember, the paths mentioned in the entrypoint are relative to the Live App's folder. This file will house the core code for your Streamlit application. Here's a basic example to guide you:
import streamlit as st
def main():
st.title("Hello, MINEO!")
st.write("Welcome to your first Streamlit Live App on MINEO.")
if __name__ == "__main__":
main()
This code serves as a simple Streamlit app with a welcoming message. You can expand upon this with more features and components as desired.
Step 2: Set Up a New Live App
You'll then need to establish a new Live App on MINEO and specify an entrypoint command. This command will start your application in the Live App environment.
Here's the basic structure for the entrypoint command:
pip install streamlit && streamlit run app.py --server.port 8000
Setting the server port to 8000 is crucial for making your app accessible via MINEO.
Adding Dependencies
If your app requires additional packages, you have two ways to include them:
-
Direct
pip install: Include the necessary packages directly in the entrypoint command.pip install streamlit pandas matplotlib && streamlit run app.py --server.port 8000 -
Using
requirements.txt: List your dependencies line by line in arequirements.txtfile and reference it in the entrypoint command.pip install -r requirements.txt --no-cache-dir && streamlit run app.py --server.port 8000
Example requirements.txt:
streamlit
pandas
matplotlib
Launch and Share Your Live App
With your app.py and entrypoint command ready, hit the Execute button. This deploys your Streamlit application, making it accessible.
You're all set to share your Live App URL and start developing in a stable and robust environment on the MINEO platform. Enjoy your Streamlit Live App!