This project use AI to turn description to MDF group and recommended form.
- Create virtual env. The 1st venv is option. The 2nd venv is we named the virtual env as ‘venv’
python -m venv venv
- Active the virtual venv by gitbash
source venv/Scripts/activate
- Install all dependency
pip install -r requirements.txt
- Data training is necessary in first run. Update following configable.
IS_TRAIN_MODEL_NEEDED = True - Python run main.py
- Active the virtual venv by gitbash
source venv/Scripts/activate
- Install all dependency
pip install -r requirements.txt
- Data training is optional. Update following configable.
IS_TRAIN_MODEL_NEEDED = False - Python run main.py
- Training data: data\BasicInfo_Result.xlsx
- Input data: data\beseformDB.mdfAssetDescriptions.xlsx
-
Training data: data\recForm.xlsx
-
Input data: data\beseformDB.mdfAssetDescriptions.xlsx
-
No. of epochs: self.epochs = 50 (default)
- Output data: exc/outputs/MDF2Rec_output.xlsx
- Output data: exc/outputs/Desc2MDF_output.xlsx
Start the flask local server
flask --app main run
Example request
curl --location 'https://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"
}
]
}
- Create virtual env. The 1st venv is option. The 2nd venv is we named the virtual env as ‘venv’
python -m venv venv
- Active the virtual venv by gitbash
source venv/Scripts/activate
- Install all dependency
pip install -r requirements.txt
- Start server
flask --app main run