File size: 1,668 Bytes
13348ee
 
 
 
 
 
 
 
 
 
 
9fdbabe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
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. "}'
```