File tree 3 files changed +6
-12
lines changed
3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 1
- FROM python:3.6-slim-buster
2
-
3
- # Additional required files for openCV
4
- RUN apt-get update
5
- RUN apt-get install ffmpeg libsm6 libxext6 -y
1
+ FROM ghcr.io/clamsproject/clams-python-opencv4:1.0.0
6
2
7
3
WORKDIR ./app
8
4
@@ -12,4 +8,4 @@ RUN pip install -r requirements.txt
12
8
13
9
COPY ./ ./
14
10
15
- CMD ["python" , "app.py" ]
11
+ CMD ["python" , "app.py" ]
Original file line number Diff line number Diff line change 1
1
spacy == 2.3.2
2
- lapps == 0.0.2
3
- clams-python == 0.5.0
4
- opencv-python == 4.4.0.44
2
+ clams-python == 1.0.0
Original file line number Diff line number Diff line change @@ -120,7 +120,9 @@ def get_boxes(mmif):
120
120
def get_document_type_short_form (document ):
121
121
"""Returns 'Video', 'Text', 'Audio' or 'Image' from the document type of
122
122
the document."""
123
- document_type = os .path .split (str (document .at_type ))[1 ]
123
+ # Remove trailing "/v1" in newer @types
124
+ at_type = re .sub (r"\/v\d*$" , "" , str (document .at_type ))
125
+ document_type = os .path .split (at_type )[1 ]
124
126
return document_type [:- 8 ]
125
127
126
128
@@ -235,7 +237,6 @@ def get_alignment_views(mmif):
235
237
# Remder Media as HTML ------------
236
238
237
239
def html_video (vpath , vtt_srcview = None ):
238
- print (vpath )
239
240
vpath = url2posix (vpath )
240
241
html = StringIO ()
241
242
html .write ('<video id="vid" controls>\n ' )
@@ -311,7 +312,6 @@ def check_view_alignment(annotations):
311
312
anno_stack .append (annotation .id )
312
313
if len (anno_stack ) == 3 :
313
314
if not (anno_stack [0 ]["source" ] in anno_stack and anno_stack [0 ]["target" ] in anno_stack ):
314
- print (anno_stack )
315
315
return False
316
316
anno_stack = []
317
317
return True
You can’t perform that action at this time.
0 commit comments