-
Notifications
You must be signed in to change notification settings - Fork 17
63 lines (56 loc) · 1.69 KB
/
test.yml
File metadata and controls
63 lines (56 loc) · 1.69 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Test
on: [push]
jobs:
test-on-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install onnxruntime
python setup.py install
- name: Download
run: |
mkdir images
wget https://ai-studio-static-online.cdn.bcebos.com/c4c758456cc74d9e997a72a25c47a3a57707b0664ed546819e4d5981ba765b13 -O images/ch.jpg
- name: Test
run: |
touch test.py
echo "from agentocr import OCRSystem" >> test.py
echo >> test.py
echo "import cv2" >> test.py
echo >> test.py
echo "ocr = OCRSystem()" >> test.py
echo >> test.py
echo "out=ocr.ocr(cv2.imread('images/ch.jpg'))" >> test.py
echo >> test.py
echo "print(out)" >> test.py
echo >> test.py
python test.py
agentocr system --config ch --image_dir images
test-on-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install onnxruntime
python setup.py install
choco install wget -y
- name: Download
run: |
mkdir images
wget https://ai-studio-static-online.cdn.bcebos.com/c4c758456cc74d9e997a72a25c47a3a57707b0664ed546819e4d5981ba765b13 -O images/ch.jpg
- name: Test
run: |
agentocr system --config ch --image_dir images