Skip to content

hkh7897/Workshop2

 
 

Repository files navigation

Workshop (devloping food text classification system )

Web-Based Machine Learning System

Build Status

This is a project required for a Software Engineering2 course.
It is done as teamwork by Alhanouf Almansour and Kholod Alnufaie and Raghad Albosais.


Table of content

  • Project overview
  • Development environment requirements
  • How to install
  • How to use
  • Travis ci intergration
  • Releases
  • Contributors

Project overview

The purpose of the project is to gain a knowledge of currently challenges of software engineering activities and the skills to apply them.
The project is divided into two take, the first task is to run the first version of a developed web-based machine learning system for simple text classification (form this repo in GitHub) and create a repo, put in it the code after completing the run, create the tag, and put the first release in the repo.
The second task we will integrate and run Travis CI in this repo, and update the user interface page. It will be done on 9/12/2021.


Development environment requirements

  • VM
  • Ubuntu OS in VM

How to install

Download the three files (index.html, index.js, and train.txt) in your ubuntu environment. Next, follow the steps below 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.

  1. Download npm:
sudo apt install npm 
  1. Create and open project folder:
mkdir [your choice name] 
  1. Initialize requirements:
npm init -y 
  1. Add index.html,index.js and train.txt in the same folder. [check the supplement materials]
  2. Install the Node.js sandbox for the Machine learning algorithm (fasttext):
npm install nodefasttext --save 
  1. Install Express:
npm install express --save 
  1. Install some cors issues:
npm install cors --save 
  1. Now if you want to get this sandbox up and running pretty quick you go ahead and use my HTML and J's files (provided on this URL) and once you have done.
  2. Run index.js:
node index.js

How to use

After you install it, the result of the last command will provide to your localhost port number, open it in your browser by typing “localhost:8000” and HTML page showen below will appear accordingly.

HTML page start

Next, you can type text to be classified and test if its success, for example, type ”baked potatoes”.

type ”baked potatoes”

The result on HTML page appears "success" and in the terminal illustrates all possible labels for that text.

HTML page result

terninal result


travis ci integration


step :
1- log in in travic ci with github account
2- active the repository [workshop2] in travic
3- puch travic.yml file in repository


issue :
it was show error for every branch and dose not accept the changes and build.
the solution i modify the package.json file in repository by exchange this part.
"test": "echo "Error: no test specified" && exit 1
with
"test": "echo "No test specified""


Releases

first release
The first release with tag V0.0.0 is created with the same code we have run it. in obunto


second release
update the GUI

The second release with tag V0.1.0 is created with the new code i update the GUI to have tow additional feature.

1- clear button to clear the entered text when user click the button
the text before sending it the server.
before press clear

after press clear

2- Submit button shall be responsible to wrap the text and send it to the server for further analysis After that once the text submitted to the server, the server would be able to analyze the text and label the text with the correct labels the results after being processed returned to the user’s page in the table the text presented on the left and its associated tag is on the right
try with backed potetoes

try with reice


Contributors

Made with raghad albosais and Alhanouf Almansour

About

food text labeling predictions

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 78.0%
  • HTML 22.0%