Welcome to this repository! 🎉 Here, you'll find an introduction to Streamlit, an easy-to-use, open-source app framework for Machine Learning and Data Science enthusiasts. This project is part of the Data Science Retreat (DSR) course, and includes all the necessary instructions and datasets to create and deploy a Streamlit app, featuring visualizations and ML-based predictions. After attending this class, you will know how to easily transform your data and ML models into interactive web apps that anyone can explore.
This repository is dedicated to helping you understand how to use Streamlit as a powerful tool for sharing your Machine Learning projects. With Streamlit, you can:
- Build user-friendly, interactive interfaces for your models.
- Share your work effortlessly as a web application, without needing extensive web development skills.
- Allow users to visualize, interact with, and test your models in real time.
This is perfect for those who want to go beyond static notebooks and bring their ML work to life in a way that others can easily use and understand.
- Short introduction of Streamlit
- First examples (streamlit hello)
- Demo the App we want to build together until end of day
- Step by step follow the tasks in 2410_streamlit_pracitcal.ipynb
- Easy Setup: Learn how to set up Streamlit in just a few steps.
- Step-by-Step App Creation: Follow detailed instructions on how to create sliders, input forms, and charts that make your data and ML models truly interactive.
- Deployment Guide: Learn how to deploy your Streamlit app to make it accessible to others instantly.
During this class, you will create an app in your own GitHub repository, deploy it to Streamlit Cloud, and make it accessible to others. Main magic command:
Run the Streamlit app:
streamlit run app.pyStreamlit makes it incredibly simple to create beautiful and powerful data applications. With just a few lines of Python code, you can create rich visualizations, interactive widgets, and seamlessly showcase your ML models to others.
The example app we will build during this class allows you to:
- Input Data: Upload or manually input sample or inference data.
- Interact with Models: Adjust inference values and see how model predictions change in real time.
- Visualize Insights: Display data insights with dynamic charts and metrics.
Deploying your Streamlit app to Streamlit Cloud is straightforward and allows you to share your app with the world instantly. Follow these steps:
-
Push Your Code to GitHub: Make sure all your app code is pushed to a public GitHub repository.
-
Create an Account on Streamlit Cloud: Go to Streamlit Cloud and create an account if you haven't done so already.
-
Deploy the App:
- Click on 'New App' on your Streamlit Cloud dashboard.
- Connect your GitHub account and select the repository containing your Streamlit app.
- Choose the branch (e.g.,
main) and specify the entry point file (e.g.,app.py).
-
Click Deploy: Once you have selected the appropriate settings, click 'Deploy'. Your app will be deployed, and you'll receive a shareable link.
-
Share Your App: Once deployed, you can share the URL with others, allowing them to interact with your ML models directly through their browser.