Code Monkey home page Code Monkey logo

desc2mdf's Introduction

This project use AI to turn description to MDF group and recommended form.

First time start the project

  1. Create virtual env. The 1st venv is option. The 2nd venv is we named the virtual env as ‘venv’

    python -m venv venv

  2. Active the virtual venv by gitbash

    source venv/Scripts/activate

  3. Install all dependency

    pip install -r requirements.txt

  4. Data training is necessary in first run. Update following configable.
    IS_TRAIN_MODEL_NEEDED = True
  5. Python run main.py

Everytime start the project

  1. Active the virtual venv by gitbash

    source venv/Scripts/activate

  2. Install all dependency

    pip install -r requirements.txt

  3. Data training is optional. Update following configable.
    IS_TRAIN_MODEL_NEEDED = False
  4. Python run main.py

Input

MDF2Rec (Desc2Rec?)

  • Training data: data\BasicInfo_Result.xlsx
  • Input data: data\beseformDB.mdfAssetDescriptions.xlsx

Desc2MDF

  • Training data: data\recForm.xlsx

  • Input data: data\beseformDB.mdfAssetDescriptions.xlsx

  • No. of epochs: self.epochs = 50 (default)

Output

MDF2Rec (Desc2Rec?)

  • Output data: exc/outputs/MDF2Rec_output.xlsx

Desc2MDF

  • Output data: exc/outputs/Desc2MDF_output.xlsx

Start flask localhost server

Start the flask local server

flask --app main run

Example request

curl --location 'http://localhost:5000'
--header 'Content-Type: application/json'
--data '{"desc": "['''ABC''', '''IMPULSION PUMP, LONG''', '''POWER SUPPLIER''']"}'

Example reponse

{
  "data": [
    {
      "desc": "ABC",
      "groupNo": "mm-pm-00",
      "recommendedForm": "MDF15"
    },
    {
      "desc": "IMPULSION PUMP, LONG",
      "groupNo": "mm-pm-32",
      "recommendedForm": "MDF01"
    },
    {
      "desc": "POWER SUPPLIER",
      "groupNo": "mm-pm-01",
      "recommendedForm": "MDF15"
    }
  ]
}

Installation on server

  1. Create virtual env. The 1st venv is option. The 2nd venv is we named the virtual env as ‘venv’

    python -m venv venv

  2. Active the virtual venv by gitbash

    source venv/Scripts/activate

  3. Install all dependency

    pip install -r requirements.txt

  4. Start server

    flask --app main run

desc2mdf's People

Contributors

linuscyl avatar llano1025 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.