Skip to content

Demonstrates the deployment process of FanaticFi, an NBA Draft Rank Prediction app empowered by Support Vector Machines (SVM) machine learning model using the Flask application and Heroku cloud services. This user-friendly web application is going to predict whether NBA rookie’s draft rank is within the top 15 or below based on given player’s st…

License

Notifications You must be signed in to change notification settings

YanjunLin-Andrie/FanaticFi_Heroku

Repository files navigation

header

FanaticFi_Heroku

FanaticFi Heroku demonstrates the deployment process of FanaticFi – NBA Draft Rank Prediction is empowered by Support Vector Machines (SVM) machine learning model using the Flask application and Heroku cloud services. This user-friendly web application is going to predict whether NBA rookie’s draft rank is within the top 15 or below based on given player’s statistics.


Link to the web application click here


The process includes building a machine learning model, save the model, then create an API for the model, develop HTTP templates with css styles. Utilize predictive capabilities of the machine learning model through HTTP requests using Flask on a local website and finally deploy the API to Heroku cloud.

Section titles:


Technologies

This project leverages python 3.7

  • Flask - deploy web applications in Python locally

  • Pandas - Data analysis and manipulation

  • Pickle - Serializing and deserializing a Python object structure

  • Scikit-learn - Supply machine learning tools and dependencies

  • Heroku - Deploy application into shareable web cloud

pip install Flask
pip install pandas
pip install pickle5
pip install -U scikit-learn

App Development

  • Collect data and data preprocessing

    • Data credit Sports Reference
    • Clean, regroup, scale, and split data to train machine learning model
  • Develope a machine learning model and save as a pkl file

    • Choose Support Vector Machine model for binary classification
    • Save model as a pickle file for later use

App Deployment

Flask preparation and deployment

  • app.py uses pickle files, renders index.html GUI, and connects Flask
  • index.html enables user interactive functions of the application
  • styles.css render design and format of index.html

Go to the correct file directory and Run application using command line under the virtual environment contains all necessary dependencies

python app.py

commandline

Then, copy and paste the given web address http://127.0.0.1:5000/ to browser and checkout the result of the API.

1

Heroku preparation and deployment

  • Create new virtual environment using

conda create --name fanaticfi python=3.7

  • Create Procfile and requirements.txt file
pip install gunicorn
echo "web: gunicorn app_basic:app" > Procfile
pip freeze > requirements.txt

proc txt

  • Commit and Push all files to GitHub

  • Connect GitHub repository with Heroku

connect

  • Deploy branch to Heroku

deploy

  • View application on global web page here

1


Contributors

Yanjun Lin Andrie    |    email: yanjun.lin.andrie@gmail.com   |    in


License

License: MIT

About

Demonstrates the deployment process of FanaticFi, an NBA Draft Rank Prediction app empowered by Support Vector Machines (SVM) machine learning model using the Flask application and Heroku cloud services. This user-friendly web application is going to predict whether NBA rookie’s draft rank is within the top 15 or below based on given player’s st…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published