text-classification / README.md
tangminhanh's picture
Update README.md
9fdbabe verified
---
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:
```bash
python3.10 -m venv myenv
```
2/ Activate environment
##### On macOS and Linux:
```bash
source myenv/bin/activate
```
##### On Windows:
```bash
myenv\Scripts\activate
```
Install dependencies
```bash
pip install -r requirements.txt
```
Run the app.py
```bash
uvicorn app:app --reload
```
> Success if it returns: Application startup complete.
> To test the model, open a new terminal and type in
```bash
curl -X POST "http://0.0.0.0:8000/classify/" -H "Content-Type: application/json" -d '{"text": "I need attach salary increase for employee"}'
```
```bash
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 [email protected] and cc [email protected]. 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 [email protected] and cc: [email protected] with the email subject: CS (Podium) - ________ For TS requests and concerns please send them to [email protected] For Medical concerns please contact KMC Health Hotline at 02-87796540 local 1111 Stay safe. "}'
```