Skip to content

This repository is based on developing a web-based machine learning system for simple text classification (food text labeling predictions).

Notifications You must be signed in to change notification settings

SarahAlsarami/Workshop-2-group-13

Repository files navigation

Text Classification System

This workshop is based on developing a web-based machine learning system for simple text classification. The following steps will show you how to set up a Node js server to run the core system of the machine learning (fasttext tool for text classification) on input from a user.

First of all, you must enter the commands to install npm in the Linux system so I downloaded the virtual box on my pc then in the terminal I wrote these commands to install npm.

Download npm

Download npm

To install npm

sudo apt install npm

Then I create a folder and name it "sat" , placed in the desktop then I put the files :( index.html,index.js and train.txt ) in the folder .

Initialize requirements

First we should Go to the project folder directory

cd Desktop
cd sat

Then start to initialize requirements just follow these commands

npm init -y

Download dependencies for a System:

1: Install node fasttext

npm install node-fasttext --save

2: Install Express:

npm install express --save

4: Install some cors issues:

npm install cors --save

Travis CI

Travis CI was the first CI as a Service tool. It introduced a new approach to building code in the cloud. This CI tool allows the user to sign up, link their repository, build, as well as test their apps.

What does Travis do?

Travis CI offers following benefits:

  • You can monitor GitHub projects
  • Runs Test and generate results quickly. Parallel test execution is possible.
  • Build artifacts & check code quality

Steps integrate to Travis

first go to the Travis CI sign in with your account in GitHub then accept the Authorization of Travis CI. then click on your profile picture in the top right of your Travis Dashboard, click Settings and then the green Activate button, and select the repositories you want to use with Travis CI.

I made some modifications to my files to make the build pass

in package.json it was

  "test": "echo \"Error: no test specified\" && exit 1"

change it to

    "test": "echo \"No test specified\""

and in .travis.yml it was

  Language: node_js
Node_js: 
 10

change it to

    Language: node_js
Node_js: 
 -7

Then I uploaded the files after change to GitHub to see if you passed in travis

in termnal

  git status
  git add .
  git commit -m " # commit"
  git push

When you return to Travis CI and go to the intended repository and then click in branches, you will find pass like in this picture App Screenshot App Screenshot

About

This repository is based on developing a web-based machine learning system for simple text classification (food text labeling predictions).

Resources

Stars

Watchers

Forks

Packages

No packages published