Process Monitor: A powerful zero-shot text classification exercise.
This is a full stack web application which uses the hugging face Zero-Shot Classification model, (specifically the facebook/bart-large-mnli model) to determine if processes, or actions, either comply with, or deviate from a provided guideline.
For example:
If the action is “Closed ticket #48219 and sent confirmation email” and the guideline is “All closed tickets must include a confirmation email”, then the expected result should be COMPLIES.
In order to run the project, you need for first create your own hugging face API read token.
- Create a free Hugging Face account at huggingface.co.
- In
Profile→Access Tokens, create a newReadtoken.
Next we need to set up our environments:
Next we will set up the frontend .env.local file, which is currently set to default. This is mainly set up for future enhancements where the front end and the backend need to reside in different locations.
cd frontend/
cp .env.example .env.localNext we will need to set up the backend .env file and use our hugging face API key created in the first step.
cd ../backend
cp .env.example .env
vim .envthen replace the HUGGINGFACE_API_KEY default value with your key from step 1.
Now that the environment is set up, "start the backend" in your terminal:
cd backend
npm install
npm run build
npm run startNext, in a seperate terminal, "start the frontend":
cd frontend
npm install
npm run build
npm run startNow open the browser and navigate to http://localhost:3000
Tests are hosted in the backend. See backend README.