text-classification / README.md
tangminhanh's picture
Update README.md
9fdbabe verified
metadata
title: Text Classification
emoji: 🐢
colorFrom: purple
colorTo: yellow
sdk: docker
pinned: false
license: mit

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

Set up environment

Creating a Virtual Environment with venv

1/ To create an environment:

  python3.10 -m venv myenv

2/ Activate environment

On macOS and Linux:
  source myenv/bin/activate
On Windows:
  myenv\Scripts\activate

Install dependencies

  pip install -r requirements.txt

Run the app.py

  uvicorn app:app --reload

Success if it returns: Application startup complete. To test the model, open a new terminal and type in

curl -X POST "http://0.0.0.0:8000/classify/" -H "Content-Type: application/json" -d '{"text": "I need attach salary increase for employee"}'
curl -X POST "http://127.0.0.1:8000/classify/" -H "Content-Type: application/json" -d '{"text": "I am out of the office and no access to my email. For site concerns and clarifications  kindly send an email to servicedesk@kmc.solutions and cc podium@kmc.solutions. For permit processing  please be reminded that the submission  is from Monday to Friday only before 12nn (except holidays). I will do my best to respond to your email as soon as I came back to work. For CS request  please send it to servicedesk@kmc.solutions and cc: podium@kmc.solutions with the email subject: CS (Podium) - ________ For TS requests and concerns  please send them to servicedesk@kmc.solutions For Medical concerns  please contact KMC Health Hotline at 02-87796540 local 1111 Stay safe. "}'