Streamlit Python Course: Build a Machine Learning App to Predict Cancer

  Рет қаралды 31,376

Alejandro AO - Software & Ai

Alejandro AO - Software & Ai

Күн бұрын

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

Пікірлер: 73
@alejandro_ao
@alejandro_ao 6 ай бұрын
💬 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
@Arkantosi
@Arkantosi Ай бұрын
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.
@joeg3117
@joeg3117 3 ай бұрын
wow ! I will give it a try ! Big thanks to you !
@David-cx3fc
@David-cx3fc 10 ай бұрын
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
@alejandro_ao
@alejandro_ao 10 ай бұрын
dude you are amazing, congratulations! keep it up, this was quite a complex tutorial so you’re on fire!
@tarnished3455
@tarnished3455 Жыл бұрын
Great video! really loved it👌
@kevinalexis9886
@kevinalexis9886 Жыл бұрын
Thanks for sharing!
@soyedafaria4672
@soyedafaria4672 5 ай бұрын
I've successfully made my first Streamlit app, all thanks to your incredible video tutorial! 😊
@alejandro_ao
@alejandro_ao 4 ай бұрын
it's you who are incredible ;) keep up the great work!
@VuNguyen-pv2lp
@VuNguyen-pv2lp Жыл бұрын
Thanks very much for sharing it. Learning a lot from it. Really appreciate it!
@alejandro_ao
@alejandro_ao Жыл бұрын
It's my pleasure!
@muhammadzakiahmad8069
@muhammadzakiahmad8069 Жыл бұрын
Hey Alejandro Great tutorial, cleared many doubts I had. I would love to have an MLOps course from you.
@TheKwame83
@TheKwame83 2 ай бұрын
Thank you for this great tutorial. It was fun working on it. Great job!
@alejandro_ao
@alejandro_ao Ай бұрын
i appreciate it!
@cihan1403
@cihan1403 Жыл бұрын
More ML tutorials please,your videos are amazing!!
@akhilreddy5933
@akhilreddy5933 Жыл бұрын
This was awesome! Thank you.
@alejandro_ao
@alejandro_ao Жыл бұрын
you are awesome
@DipeshGhag-dy2qj
@DipeshGhag-dy2qj 4 ай бұрын
Great Video 👌. Loved it ❤. Super Informative and Detailed 💯.
@alejandro_ao
@alejandro_ao 4 ай бұрын
Glad you liked it :)
@chikopheidris394
@chikopheidris394 8 күн бұрын
I do appreciate your work
@alejandro_ao
@alejandro_ao 8 күн бұрын
thank you my friend!
@prasadkk5948
@prasadkk5948 6 ай бұрын
Bro it’s good and I loved it. Being non IT guy I’m feeling proud after building this app. Subscribed and liked it😊
@alejandro_ao
@alejandro_ao 6 ай бұрын
Congrats mate!! This was not an easy project, you're on fire!!
@michaelb1099
@michaelb1099 Жыл бұрын
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
@kevinalexis9886
@kevinalexis9886 Жыл бұрын
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
@alejandro_ao
@alejandro_ao Жыл бұрын
this is a great idea mate, i'm totally gonna be doing that!
@chrisyung655
@chrisyung655 Жыл бұрын
@@alejandro_ao please do, would totally want to learn how you prompt chatgpt for that!
@chodavarapuudaykumar9204
@chodavarapuudaykumar9204 Жыл бұрын
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.
@junaidlatif2881
@junaidlatif2881 8 ай бұрын
Love you bro
@Javier-rc2zh
@Javier-rc2zh Жыл бұрын
Thank you very much for the course
@alejandro_ao
@alejandro_ao Жыл бұрын
Any time :)
@alejandro_ao
@alejandro_ao Жыл бұрын
nice evh pic btw
@rajputup1531
@rajputup1531 Жыл бұрын
really loved it brother, if possible, can you make this type of video frequently.
@alejandro_ao
@alejandro_ao Жыл бұрын
thanks! of course, i'll be making more AI and LLM applications here :)
@yuvrajthakur143thakur3
@yuvrajthakur143thakur3 5 ай бұрын
From where we can get those labels 😢 tell me
@muniswamivikram
@muniswamivikram 4 күн бұрын
Big Thanks to you bro
@alejandro_ao
@alejandro_ao Күн бұрын
it's my pleasure
@rickkenny5342
@rickkenny5342 7 ай бұрын
Thanks!
@alejandro_ao
@alejandro_ao 6 ай бұрын
you are amazing, thank you so much! i'll keep posting videos about ML
@pennadasaieshwar
@pennadasaieshwar 8 ай бұрын
bro how to add background image as a custome image is it possible to change by using this css in streamlit
@dipayanbhowal7025
@dipayanbhowal7025 2 ай бұрын
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
@jesusmunzon1336
@jesusmunzon1336 24 күн бұрын
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?
@RaihanRisad
@RaihanRisad 3 ай бұрын
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
@mr_noob6361
@mr_noob6361 Жыл бұрын
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)
@DemoGPT
@DemoGPT 11 ай бұрын
I'm loving this video - thanks for all your hard work. Are there any plans for a video about DemoGPT?
@alejandro_ao
@alejandro_ao 11 ай бұрын
maybe!
@Chasingaxl
@Chasingaxl Жыл бұрын
I am going to try this with sports data.
@s0ulweaver
@s0ulweaver Жыл бұрын
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!
@sara_zeus
@sara_zeus 7 ай бұрын
I love you! ❤
@alejandro_ao
@alejandro_ao 6 ай бұрын
i love you too
@TrollDaQA
@TrollDaQA 5 ай бұрын
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.
@polishfish
@polishfish 2 ай бұрын
Yup!
@alejandro_ao
@alejandro_ao Жыл бұрын
subscribe for more! :)
@kayre1788
@kayre1788 8 ай бұрын
Gooday awesome video Is there like a pdf format for this project explaining how it works
@nazk561
@nazk561 7 ай бұрын
If I wanted to create something similar for thymoma cancer would this be a good foundation?
@nazk561
@nazk561 7 ай бұрын
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!
@kevinalexis9886
@kevinalexis9886 Жыл бұрын
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!
@alejandro_ao
@alejandro_ao Жыл бұрын
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
@python360
@python360 Жыл бұрын
@@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! 👍👍
@madcity2073
@madcity2073 6 ай бұрын
​@@alejandro_aoI did have the same error aswell but could not install pickle5 neither, the only way it worked was without pickle5
@osamadammag6303
@osamadammag6303 6 ай бұрын
I hope you well alejandro, I have a question ⁉️ which problem this project solve !! Thanks 🙏🏻
@alejandro_ao
@alejandro_ao 6 ай бұрын
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
@rohanshinde3096
@rohanshinde3096 25 күн бұрын
accuracy ?
@muhammedabnas2894
@muhammedabnas2894 2 ай бұрын
where can i see the logistic regression video mentioned here?? please share me the link
@alejandro_ao
@alejandro_ao 2 ай бұрын
here you go: Logistic Regression Project: Cancer Prediction with Python kzbin.info/www/bejne/g6qXe5p_mquXjc0
@lokeshart3340
@lokeshart3340 Жыл бұрын
input_data['radius_mean'], ~~~~~~~~~~^^^^^^^^^^^^^^^ TypeError: 'builtin_function_or_method' object is not subscriptable pls solve this error
@ko-prometheus
@ko-prometheus Жыл бұрын
Dude, what does this software design of yours do?
@alejandro_ao
@alejandro_ao Жыл бұрын
no idea
@madcity2073
@madcity2073 6 ай бұрын
18:23 why test_size 20% and random_state = 42? please elaborate to understand the logic
@alejandro_ao
@alejandro_ao 6 ай бұрын
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
@chunman6735
@chunman6735 6 ай бұрын
did you have any web scrap project? i think this is my weakness🤣
@alejandro_ao
@alejandro_ao 5 ай бұрын
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
Build a Web App (GUI) for your CrewAI Automation (Easy with Python)
52:30
Alejandro AO - Software & Ai
Рет қаралды 13 М.
Introduction to LlamaIndex with Python (2024)
39:57
Alejandro AO - Software & Ai
Рет қаралды 1,4 М.
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,6 МЛН
Finger Heart - Fancy Refill (Inside Out Animation)
00:30
FASH
Рет қаралды 25 МЛН
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22
World’s Largest Jello Pool
01:00
Mark Rober
Рет қаралды 82 МЛН
5 Things I Wish I Knew Before Learning Streamlit
21:34
Fanilo Andrianasolo
Рет қаралды 24 М.
Streamlit Elements You Should Know About in 2023
14:31
Mısra Turp
Рет қаралды 92 М.
Streamlit: The Fastest Way To Build Python Apps?
11:57
pixegami
Рет қаралды 86 М.
Show Your ML Project To The World: Streamlit Web App Tutorial
39:08
Giraffa Analytics
Рет қаралды 148
How I would learn Machine Learning (if I could start over)
7:43
AssemblyAI
Рет қаралды 751 М.
Python: Create a ReAct Agent from Scratch
57:27
Alejandro AO - Software & Ai
Рет қаралды 7 М.
Streamlit Explained: Python Tutorial for Data Scientists
15:19
ArjanCodes
Рет қаралды 30 М.
The Streamlit Epic Overview (part 1/2)
13:06
Fanilo Andrianasolo
Рет қаралды 52 М.
The Harsh Reality of Being a Data Engineer
14:21
Jash Radia
Рет қаралды 225 М.
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,6 МЛН