Welcome to Machinfy Academy

Multiple-Choice Model Website for Text Classification in Sentiment Analysis.

blog image

Hello Everyone ! hope you’re great.
I got an idea why not we build a website with multiple-choice machine learning models for prediction the type of text and the user can use any model depends on the accuracy of each one ! so let’s begin to save your time ….


  • Problem Type & The Process
  • Technical Details
    • Dataset
    • Discovering Data
    • Model Selection and Evaluation
  • The Website
  • The Website (Tricks)

• Problem Type & The Process

The problem we’re solving here is sentiment analysis and we’ll talk about our data incoming lines.

As you see the process chart we’ve started with De-Noising & Removing Stop-words to the merging between the website and the Machine learning models code.

De-Noising & Removing Stop-words step: it was so useful for deleting any undesired words which can have a bad effect on the accuracy of the models.
Text Converting step: because the Machine learning model can identify the words and the text in general, we need to convert into numerical type and this objective of this step.
Building the machine learning models step: we’ve used different models like (logistic regression, KNN, Naïve-Bayes, Support Vector Machines).
Creating the API step: to can make the website online.
Link the processing code with the website step: after building the website using HTML and CSS in simple way as you see, we’ve linked the ML models with the website to can go through each model easily.

• Technical Details (Dataset)

The data is Movie reviews on IMDB website and I’ve downloaded from Kaggle website.
The data volume is very large so I just take 2000 review to not make my humble kind laptop blow-out !

• Technical Details (Discovering Data)

The good point about our data here is that it gets no nulls and well-distributed data between the positive and the negative reviews.

• Technical Details (Model Selection and Evaluation)

In this part we present the accuracy of each model we can use in the website after applying the data in different volume.

The Website

Now we go through the website in photos

After choosing the model we desire, we click on the model fitting to fit the model on the variable after train-test splitting data. Then we press on the evaluation button for evaluation. If it’s good enough, we can write any text review to predict this review. And here we go at the last photo we can see the prediction !

The Website (Tricks)

Now we can see the HTML code which is the key of merging the select tag with the API commands code.

Onchange attribute we can go to any link (the default link of API is which is existed in the value attribute in the option tag so here we can open any html page which connected to the API code

So here when we click on the any option will take us the link ( to the HTML page (Home.html) and the same to the model fitting, evaluate and predict buttons which appear their result in iframe tag beside them.

At the End You can check the project presentation by clicking here and I hope you got excited about my small project and wait more simple ideas.

Leave a Reply

Your email address will not be published.