@@ -271,20 +271,20 @@ curl -X POST \
271271
272272### 2. Train a new classification model using pre-trained BERT model
273273
274- ** The new text dataset should be stored at S3 first, with the directory architecture in S3 should look like this** :
274+ ** The new text dataset should be stored at S3 first, the directory architecture in S3 should look like this** :
275275```
276276.
277277├── YOUR_BUCKET_NAME
278278│ ├── train.tsv
279- │ ├── dev .tsv
279+ │ ├── val .tsv
280280│ ├── test.tsv
281281```
282282The folder name you give to * YOUR_MODEL_NAME* will be used to identify this model once it get trained.
283283
284- The name of train, dev and test files ** can't be changed** .
284+ The name of train, val and test files ** can't be changed** .
285285The train and dev file should have below format (without header)-
286286id label None Sentence
287- 1 0 NC
287+ 1 0 NC Text
288288The test.tsv file should only have id and sentence column (with header)
289289** The S3 folders should have public access permission** .
290290
@@ -297,4 +297,25 @@ curl -X POST \
297297 -H ' content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
298298 -F train_bucket_name=YOUR_BUCKET_NAME \
299299 -F train_bucket_prefix=YOUR_MODEL_NAME
300- ```
300+ ```
301+ ### 3. Lable all text in a csv file using pre-trained BERT model
302+
303+ ** The new test tsv file should be stored at the same S3 bucket as above for that model, directory architecture in S3 should look like this** :
304+ ```
305+ .
306+ ├── YOUR_BUCKET_NAME
307+ │ ├── train.tsv
308+ │ ├── val.tsv
309+ │ ├── test.tsv
310+ ```
311+ To call this API do:
312+ ``` bash
313+ curl -X POST \
314+ http://127.0.0.1:3031/sentimentV1/testbert \
315+ -H ' Cache-Control: no-cache' \
316+ -H ' Postman-Token: 4e90e1d6-de18-4501-a82c-f8a878616b12' \
317+ -H ' content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
318+ -F test_bucket_name=YOUR_BUCKET_NAME \
319+ -F test_bucket_prefix=YOUR_MODEL_NAME
320+ ```
321+ At the end of prediction a file named 'test_results.csv' will be uploaded to the same S3 bucket.
0 commit comments