-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtest_v2_cli.sh
More file actions
executable file
·41 lines (33 loc) · 1.11 KB
/
test_v2_cli.sh
File metadata and controls
executable file
·41 lines (33 loc) · 1.11 KB
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
#!/bin/sh
set -e
TEST_FILE='./tests/data/file_types/pdf/blank_1.pdf'
for f in $(
find docs/code_samples -maxdepth 1 -name "v2_*.txt" | sort -h
)
do
echo "###############################################"
echo "${f}"
echo "###############################################"
echo
if echo "${f}" | grep -q "v2_classification.txt"
then
node ./dist/bin/mindeeV2.js -d classification -m "${MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID}" "${TEST_FILE}"
fi
if echo "${f}" | grep -q "v2_crop.txt"
then
node ./dist/bin/mindeeV2.js -d crop -m "${MINDEE_V2_SE_TESTS_CROP_MODEL_ID}" "${TEST_FILE}"
fi
if echo "${f}" | grep -q "v2_extraction.txt"
then
node ./dist/bin/mindeeV2.js -d extraction -m "${MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID}" "${TEST_FILE}"
fi
if echo "${f}" | grep -q "v2_ocr.txt"
then
node ./dist/bin/mindeeV2.js -d ocr -m "${MINDEE_V2_SE_TESTS_OCR_MODEL_ID}" "${TEST_FILE}"
fi
if echo "${f}" | grep -q "v2_split.txt"
then
node ./dist/bin/mindeeV2.js -d split -m "${MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID}" "${TEST_FILE}"
fi
sleep 0.5 # avoid too many request errors
done