Created a web-app to recommend players using FIFA19 dataset by applying Nearest Neighbours.
- Python
- Flask
- Jinja
- HTML, CSS, JS
As per domain knowledge, some features are selected from the given features for training the model. The dataset is preprocessed to remove missing values and converting categorical labels to numeric values. Finally, the dataset is normalized.
The model is trained using nearest neighbor package from sklearn.neighbors. The algorithm method used here is "auto". 5 nearest neighbors are returned by the model which can be later on visualized using Flask.
The model is deployed using Flask and Jinja2 template. Flask is a micro web framework written in Python. Jinja is a web template engine for the Python programming language and is licensed under a BSD License created by Armin Ronacher.
- The pickle model is loaded in the backend and then the query is passed using the POST method.
- To make the output more expressive, images, overall, position, club and name of the query player and predicted players is returned.
- The images are downloaded during run time using the get_imgs.py script. The images have to be in the "./static" folder as per Flask terminologies.
The home page:
Predictions:
Drive: https://drive.google.com/file/d/1i-MAbRClc_ojEQNB9VJJyD1D8jyM8Rgp/view?usp=drivesdk