djomo commited on
Commit
2040850
1 Parent(s): 65b2717

Upload handler.py

Browse files
Files changed (1) hide show
  1. handler.py +6 -2
handler.py CHANGED
@@ -1,9 +1,13 @@
 
 
 
 
 
 
1
  from typing import Dict, List, Any
2
  import base64
3
- from PIL import Image
4
  from io import BytesIO
5
  import numpy as np
6
- from paddleocr import PaddleOCR, draw_ocr
7
 
8
  class EndpointHandler():
9
  def __init__(self, path=""):
 
1
+ import os
2
+ os.system('pip install paddlepaddle==2.4.2')
3
+ # os.system('pip install paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html')
4
+ os.system('pip install paddleocr')
5
+ from paddleocr import PaddleOCR, draw_ocr
6
+ from PIL import Image
7
  from typing import Dict, List, Any
8
  import base64
 
9
  from io import BytesIO
10
  import numpy as np
 
11
 
12
  class EndpointHandler():
13
  def __init__(self, path=""):