The goal of this project is to build ML system available with REST API. For building the ML service I used Django and Django Rest Framework.This machine learning web service system is designed to predict the number of subscribers of a online course after a specified time based on parameters such as:
- keywords in course title
- course price
- course level
- number of lectures
- content duration
I trained several ML models (with tuning hyperparameters) and placed them on a web server:
- LinearRegression
- RidgeRegression
- LassoRegression
- SVR with RBF kernel
- KNeighborsRegressor
- RandomForestRegressor
- GradientBoostingRegressor

Data come from https://www.kaggle.com/andrewmvd/udemy-courses/. Dataset cointains 3600+ Udemy Course come from 4 categories:
- Business Finance
- Graphic Design
- Musical Instruments
- Web Development
- python 3.7
- django 2.2.7
- djangorestframework 3.11.0
- pandas
- numpy
- nltk
- scikit-learn
- plotly
- requirements.txt - file with all required packages.
- Analitics - folder contains all files related to analitics part of application like datasets, ml models, notebook with a description of prepare ml models and EDTA.
- ML_App - folder contains web app files.
- Images - folder contains screenshots and chars to create Readme.
- Download repository. git clone https://github.com/Cyki89/Rest_Api.git.
- Create new virtual enviroment. mkvirtualenv --python=/usr/bin/python3.7 virtualenv_name.
- Install dependecies. pip install -r requirements.txt.
- Go to main application folder. cd ML_App.
- Run server on your local machine. python manage.py runserver.
- Open localhost in your browser. https://127.0.0.1:8000. You should look Main Browable api view like this:

- Go to 'users_router'. http://127.0.0.1:8000/api/users/.

- Register new user. http://127.0.0.1:8000/api/users/register/ or use TestUser account with password: test1234.

- Go to login view. http://127.0.0.1:8000/api/users/login/. You can copy token to use token authentication in future steps.

- Go to 'requests_router. http://127.0.0.1:8000/api/requests/

- Create request. http://127.0.0.1:8000/api/requests/create/. You have to be logged in or pass valid token in headers to make a request. Fill request form and click POST button:

- See prediction. You should receive response in JSON Format:

- Then you can change the request parameters, make another request, see a list of all requests or filter the results you are interested in.
- Deploy this application on a public web server (currently all free servers offer insufficient capacity to store all necessary dependencies).
- Add User Interface.