tangminhanh commited on
Commit
9fdbabe
1 Parent(s): 6ec24c2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -0
README.md CHANGED
@@ -9,3 +9,35 @@ license: mit
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12
+ ### Set up environment
13
+ ##### Creating a Virtual Environment with venv
14
+ 1/ To create an environment:
15
+ ```bash
16
+ python3.10 -m venv myenv
17
+ ```
18
+ 2/ Activate environment
19
+ ##### On macOS and Linux:
20
+ ```bash
21
+ source myenv/bin/activate
22
+ ```
23
+ ##### On Windows:
24
+ ```bash
25
+ myenv\Scripts\activate
26
+ ```
27
+
28
+ Install dependencies
29
+ ```bash
30
+ pip install -r requirements.txt
31
+ ```
32
+ Run the app.py
33
+ ```bash
34
+ uvicorn app:app --reload
35
+ ```
36
+ > Success if it returns: Application startup complete.
37
+ > To test the model, open a new terminal and type in
38
+ ```bash
39
+ curl -X POST "http://0.0.0.0:8000/classify/" -H "Content-Type: application/json" -d '{"text": "I need attach salary increase for employee"}'
40
+ ```
41
+ ```bash
42
+ 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. "}'
43
+ ```