Add: README
This commit is contained in:
parent
374bc2d903
commit
12e5cbce49
@ -21,3 +21,58 @@ Sample at `env_sample/example_local_env`
|
||||
`python manage.py runserver 0.0.0.0:8000`
|
||||
### 2.2.3 Run Worker
|
||||
`celery -A fwd_api.proj.worker worker -l INFO --without-gossip --without-mingle --without-heartbeat -Ofair --pool=solo`
|
||||
|
||||
|
||||
|
||||
## Feature
|
||||
### Semi correction
|
||||
**API URL**: /api/automation/
|
||||
#### **Exclaimer**: This process will overwrite all request files (images) reason and counter measure with the provided rule
|
||||
#### How to use
|
||||
Example:
|
||||
subsidiary: SESP \
|
||||
Invoice_Purchase Date_Accuracy: 100% \
|
||||
Invoice_Sold_To_Party_OCR: != "" \
|
||||
Invoice_Retailer_OCR: Samsung Brand Store \
|
||||
Reason to fill: Wrong Feedback \
|
||||
Counter Measure: Update revised resutl and re-calculate accuracy \
|
||||
The config would be as following
|
||||
```
|
||||
{
|
||||
"subsidiary": "SESP",
|
||||
"predict_result": {
|
||||
"retailername": "Samsung Brand Store",
|
||||
"sold_to_party": "notEmpty"
|
||||
},
|
||||
"feedback_accuracy": {
|
||||
"purchase_date": 1
|
||||
},
|
||||
"reason": "Wrong Feedback",
|
||||
"counter_measures": "Update revised result and re-calculate accuracy"
|
||||
},
|
||||
```
|
||||
|
||||
Supported special commands: ["<", "Empty", "notEmpty", "starts_with"] \
|
||||
To use the commands with values, you need to sperate it with the value by `||` for example: "<||1.0" means <100% and "starts_with||Shopee" means Shopee*
|
||||
|
||||
#### Modify a duration with a rule:
|
||||
```
|
||||
curl -X 'POST' \
|
||||
'<server_url>/api/automation/<rule_id>/scan/' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Authorization: <token>' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"start_date": "2024-05-17T07:27:19.087Z",
|
||||
"end_date": "2024-07-17T07:27:19.087Z"
|
||||
}'
|
||||
```
|
||||
|
||||
To get the list of URLS:
|
||||
```
|
||||
curl -X 'GET' \
|
||||
'<server_url>/api/automation/' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Authorization: <token>'
|
||||
```
|
||||
More infomation, please refer to the swagger page
|
Loading…
Reference in New Issue
Block a user