From ce97f7e252832c3c8e05b7d173787bbacf025e28 Mon Sep 17 00:00:00 2001 From: Zixin Jiang <1192119703jzx@gmail.com> Date: Mon, 26 Aug 2024 03:12:42 -0400 Subject: [PATCH 1/2] fixed issue #10 and #11 --- app.py | 5 ++--- metadata.py | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 79add7a..e973290 100644 --- a/app.py +++ b/app.py @@ -91,8 +91,7 @@ def run_on_video(self, mmif: Mmif, videodocument: Document, new_view: View, **co + mmif, annotated with boundingboxes """ cap = vdh.capture(videodocument) - views_with_tframe = [v for v in mmif.get_views_for_document(videodocument.id) - if v.metadata.contains[AnnotationTypes.TimeFrame]] + views_with_tframe = mmif.get_views_contain(AnnotationTypes.TimeFrame) if views_with_tframe: frame_type = set(config["frameType"]) frame_type.discard("") # after this, if this set is empty, the next step will use "all" types @@ -144,7 +143,7 @@ def get_app(): if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument("--port", action="store", default="5000", help="set port to listen" ) + parser.add_argument("--port", action="store", default="3000", help="set port to listen" ) parser.add_argument("--production", action="store_true", help="run gunicorn server") # add more arguments as needed # parser.add_argument(more_arg...) diff --git a/metadata.py b/metadata.py index e9fd85a..601a90b 100644 --- a/metadata.py +++ b/metadata.py @@ -33,7 +33,6 @@ def appmetadata() -> AppMetadata: metadata.add_parameter( name="frameType", type="string", - choices=["", "slate", "chyron", "rolling-credit"], default="", multivalued=True, description="Segments of video to run on. Only works with VideoDocument input and TimeFrame input. Empty value means run on the every frame types.", From d827c3ea694891e3da398625d9f9efcfe60303ee Mon Sep 17 00:00:00 2001 From: Zixin Jiang <1192119703jzx@gmail.com> Date: Mon, 26 Aug 2024 03:15:54 -0400 Subject: [PATCH 2/2] change small typo --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index e973290..8c7170b 100644 --- a/app.py +++ b/app.py @@ -143,7 +143,7 @@ def get_app(): if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument("--port", action="store", default="3000", help="set port to listen" ) + parser.add_argument("--port", action="store", default="5000", help="set port to listen" ) parser.add_argument("--production", action="store_true", help="run gunicorn server") # add more arguments as needed # parser.add_argument(more_arg...)