Streamlit Python Course: Build a Machine Learning App to Predict Cancer
Vložit
- čas přidán 29. 07. 2024
- Welcome to this Streamlit Python tutorial, where we will dive into creating an interactive machine-learning web application using the Streamlit framework! In this comprehensive project-based course, you'll learn how to build a machine-learning dashboard to predict whether a cell cluster is benign or malignant using Python and Streamlit. This tutorial is perfect for beginners, experienced developers, and data scientists looking to learn how to create powerful machine-learning projects that integrate with web applications.
-----------------------
🔥 Useful links:
- Github project: github.com/alejandro-ao/strea...
- Blog post: alejandro-ao.com/posts/data-s...
💬 Join the Discord Help Server - link.alejandro-ao.com/HrFKZn
❤️ Buy me a coffee... or a beer (thanks): link.alejandro-ao.com/l83gNq
✉️ Join the mail list: link.alejandro-ao.com/AIIguB
------------------------
🚀 What you'll learn in this tutorial:
How to create a Streamlit dashboard
Training a logistic regression model for machine learning
Visualizing data using Plotly
Displaying predictions based on user input
Creating an AI full-stack app using Python
In this video tutorial, we train a logistic regression model using machine learning in Python. We will be using a dataset to predict whether a cell cluster is benign or malignant. Once our model is ready, we will integrate it into a Streamlit application that runs in the web browser. You'll see how easy it is to create an interactive dashboard using Streamlit and Python!
Next, we will visualize our data using Plotly to create informative and interactive charts. These visualizations will help users understand the predictions made by our machine-learning model. We'll then display the predictions based on the user's input, making our dashboard not only visually appealing but also highly functional.
Throughout the tutorial, we'll explore various techniques and best practices used by experts like Nicholas Renotte and Patrick Loeber. This Streamlit tutorial is an excellent resource for data science dashboard projects and a great way to learn how to create a machine learning app.
By the end of this course, you will have created an AI full-stack app using Python, Streamlit, and machine learning. You'll be ready to tackle your own machine-learning projects and create amazing data science dashboards!
Don't forget to like, comment, and subscribe to stay updated with more tutorials and projects in machine learning, data science, and web app development!
⏰ Timestamps
0:00 Intro
2:56 Download the data
6:23 Project setup
8:21 Clean the data
14:00 Train the model
21:06 Test the model
26:39 Export the model and scaler
32:33 Create the Streamlit app
38:48 Create the layout
44:18 Add the sidebar inputs
58:52 Create the chart
1:17:22 Scale the values for chart
1:25:30 Display the predictions
1:39:08 Add custom CSS
1:52:00 Deploy your app
🎯 Keywords: Streamlit Python, Streamlit Tutorial, Streamlit Dashboard, Machine Learning Python, Machine Learning App Tutorial, Python App, Machine Learning Projects, Machine Learning Projects for Beginners, Nicholas Renotte, Patrick Loeber, AI App, AI Full-Stack App, Data Science Dashboard, Data Science Dashboard Projects
#python #streamlit #MachineLearning #DataScience
💬 Join the Discord Help Server: link.alejandro-ao.com/981ypA
❤ Buy me a coffee (thanks): link.alejandro-ao.com/YR8Fkw
✉ Join the mail list: link.alejandro-ao.com/o6TJUl
The most important with your videos are that they are easy to understand and learn, not just copy what ever you're doing. Brilliant, Alejandro! I'd love to see you doing a forecasting application using different methods (Prophet, Arima, XGBoost) and from these construct some sort of planning tool for future sales.
wow ! I will give it a try ! Big thanks to you !
JUST FINISHED THE VIDEO AND MY APP IS DEPLOYED!! I feel so accomplished right now, learned a lot! Thank you again for walking through this entire process. I've never learned how to push things with git, so the end was very helpful. I owe you a beer and and my first paycheck when I get hired somewhere in tech lol
dude you are amazing, congratulations! keep it up, this was quite a complex tutorial so you’re on fire!
Great video! really loved it👌
Thanks for sharing!
I've successfully made my first Streamlit app, all thanks to your incredible video tutorial! 😊
it's you who are incredible ;) keep up the great work!
Thanks very much for sharing it. Learning a lot from it. Really appreciate it!
It's my pleasure!
Hey Alejandro Great tutorial, cleared many doubts I had. I would love to have an MLOps course from you.
Thank you for this great tutorial. It was fun working on it. Great job!
i appreciate it!
More ML tutorials please,your videos are amazing!!
This was awesome! Thank you.
you are awesome
Great Video 👌.
Loved it ❤.
Super Informative and Detailed 💯.
Glad you liked it :)
I do appreciate your work
thank you my friend!
Bro it’s good and I loved it. Being non IT guy I’m feeling proud after building this app. Subscribed and liked it😊
Congrats mate!! This was not an easy project, you're on fire!!
do you have a tutorial on how to setup your data for tuning as i have a family tree text but not sure how to go about formatting and finetuning it for use like you have clean data
I like how you integrated asking ChatGPT to simplify getting the slider_labels into input_data['radius_mean'], input_data['texture_mean'], input_data['radius_mean'] etc.... I was able to get the results in a matter of seconds. I think if you include your prompting for ChatGPT in the video that might help some of the newer people
this is a great idea mate, i'm totally gonna be doing that!
@@alejandro_ao please do, would totally want to learn how you prompt chatgpt for that!
Hi! I enjoyed this tutorial very much. I got a warning that x does not have valid feature names, but standardscaler was fitted with feature names how to rectify this.
Love you bro
Thank you very much for the course
Any time :)
nice evh pic btw
really loved it brother, if possible, can you make this type of video frequently.
thanks! of course, i'll be making more AI and LLM applications here :)
From where we can get those labels 😢 tell me
Thanks!
you are amazing, thank you so much! i'll keep posting videos about ML
bro how to add background image as a custome image is it possible to change by using this css in streamlit
Big Thanks to you bro
it's my pleasure
Hey ale i need a help from you. i am keeping my data_clean model and createmodel as sepreate py files in model folder. i didnt wanna write the clean_data function in the app/main file but just wanted to import it but there is major path issue i am facing
Enhorabuena Alejandro por el trabajo!! He seguido paso por paso tu video, cuando modifico valores en el terminal de vs code me aparece siempre este warning: X does not have valid feature names, but StandardScaler was fitted with feature names. ¿A que se puede deber esta advertencia?
I have a quesiton, why are importing pickle5, as far as i know after python 3.8 and newer pickle does all the things that pickle5 or other versions used to do
st.write("Probability of Benign:- ",model.predict_proba(scaled_array)[0][0])
st.write("Probability of Maligant:- ",model.predict_proba(scaled_array)[0][1]) bro this line.does it says that we need to remember? as like for 2 cases this is the condition. if suppose we have 3 class the we need to write [0][2](for last one)
I'm loving this video - thanks for all your hard work. Are there any plans for a video about DemoGPT?
maybe!
I am going to try this with sports data.
I'm going to try this with stocks data! It's really amazing how he has taught and we can do our own variations for topic of our interests and then change theme, title and sidebar parameters and it's a whole unique project!
I love you! ❤
i love you too
You should be careful with data leakage, shouldn't you? That is, you should first split into train and test sets and only then perform a fit_transform on the training data and a transform on the test data.
Yup!
subscribe for more! :)
Gooday awesome video
Is there like a pdf format for this project explaining how it works
If I wanted to create something similar for thymoma cancer would this be a good foundation?
Or would I need to use a completely different model. I’m new to machine learning and a computer science student at a university. Thanks!
Also not sure if it's mentioned but at around the 31:00 min mark I had an issue with Pickle5 and I needed to "import pickle" instead of "import pickle5 as pickle". Hope this helps someone with this error!
interesting. maybe you did `pip install pickle` instead of `pip install pickle5`? they are both the same library, but pickle5 is supposed to be the most recent one
@@alejandro_ao I had same issue as @kevinalexis9886 and was using Python 3.11.3 so I just changed it to "import pickle" as well and it works! 👍👍
@@alejandro_aoI did have the same error aswell but could not install pickle5 neither, the only way it worked was without pickle5
I hope you well alejandro,
I have a question ⁉️ which problem this project solve !!
Thanks 🙏🏻
hey there, this is mainly for educational purposes, but a more capable version of this would be able to make an oncologist's job way easier by allowing them to know beforehand if a tumor has a high probability of being malignant
accuracy ?
where can i see the logistic regression video mentioned here??
please share me the link
here you go: Logistic Regression Project: Cancer Prediction with Python
czcams.com/video/My4JgIeFdWk/video.html
input_data['radius_mean'],
~~~~~~~~~~^^^^^^^^^^^^^^^
TypeError: 'builtin_function_or_method' object is not subscriptable
pls solve this error
Dude, what does this software design of yours do?
no idea
18:23 why test_size 20% and random_state = 42? please elaborate to understand the logic
good question!
About the test size:
so when you partition your data, you are creating a training set and a testing set. you train your model on the training set, and test it on the testing set (which contains data that your trained model has never seen before). in this example, I set the test sample to 20%, but some people set it to 30%. the idea is to make your training set as large as possible, while leaving enough data to test it on.
About the random state:
this can be any number you like. this number is useful because it allows you to replicate your random split. in other words, the "random" split will be the same every time you run this code as long as you have chosen the same random state. so, since this number can be anything you want, nerds just started writing 42 every time because it is the answer to life, the universe and everything 👉 www.google.com/search?q=the+answer+to+life+the+universe+and+everything
did you have any web scrap project?
i think this is my weakness🤣
i haven't uploaded any about scraping in detail! but if that's your weakness, you may want to check octoparse :) it's literally the easiest way i have ever seen to scrape a website and you don't need to code it