Now it is time to build the frontend where user can test the real prediction using the machine learning model.
The frontend allows the users to provide their information and finally get the prediction.
we will use angular for making the frontend.
First install node and angular cli globally in your computer.
Then create a simple angular app using angular cli
ng new titanic-project
Now edit app.component.ts like below:
It will call the predict method from the backend to get the prediction.
A http post call is used to send input data to the backend and get the prediction.
We will make a template form where the user can provide their information.
Here we used angular ant design as the css framework.
here is our app.component.html
Final output will be look like this.
We deployed the frontend into Heroku.
If you want the code and the structure of the frontend that we deployed, feel free to get it from the git repo.