florentgbelidji HF Staff commited on
Commit
173c60d
·
1 Parent(s): 02e4833

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -1
handler.py CHANGED
@@ -4,9 +4,10 @@ from typing import Dict, List, Any
4
  from PIL import Image, ImageDraw, ImageFont
5
  from transformers import LayoutLMv2Processor, LayoutLMv2ForTokenClassification
6
  from transformers import pipeline, AutoTokenizer
7
-
8
  os.system('pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI')
9
  os.system('pip install -q detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html')
 
10
  import detectron2
11
 
12
  print(f"DETECTRON2 {detectron2.__version__}")
 
4
  from PIL import Image, ImageDraw, ImageFont
5
  from transformers import LayoutLMv2Processor, LayoutLMv2ForTokenClassification
6
  from transformers import pipeline, AutoTokenizer
7
+ os.system('pip3 install --upgrade cython')
8
  os.system('pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI')
9
  os.system('pip install -q detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html')
10
+
11
  import detectron2
12
 
13
  print(f"DETECTRON2 {detectron2.__version__}")