mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-25 12:39:25 +01:00
fix demo service && copy license for cv/language_guided_video_summarization
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10985657 * fix demo service && copy license
This commit is contained in:
@@ -2,6 +2,21 @@
|
||||
# publicly available at https://github.com/e-apostolidis/PGL-SUM, follow the
|
||||
# license https://github.com/e-apostolidis/PGL-SUM/blob/master/LICENSE.md.
|
||||
|
||||
# Copyright (c) 2021, Evlampios Apostolidis, Georgios Balaouras, Vasileios Mezaris,
|
||||
# Ioannis Patras / CERTH-ITI. All rights reserved. This code is provided for academic,
|
||||
# non-commercial use only. Redistribution and use in source and binary forms, with or without modification,
|
||||
# are permitted for academic non-commercial use provided that the following conditions are met:
|
||||
|
||||
# Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
||||
# disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
|
||||
# following disclaimer in the documentation provided with the distribution.
|
||||
# This software is provided by the authors "as is" and any express or implied warranties, including, but not limited to,
|
||||
# the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the
|
||||
# authors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but
|
||||
# not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption)
|
||||
# however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or
|
||||
# otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
|
||||
|
||||
import os
|
||||
|
||||
import h5py
|
||||
|
||||
@@ -91,7 +91,7 @@ class LanguageGuidedVideoSummarizationPipeline(Pipeline):
|
||||
frame_idx += 1
|
||||
n_frame = frame_idx
|
||||
|
||||
if sentences is None:
|
||||
if sentences is None or len(sentences) == 0:
|
||||
logger.info('input sentences is none, using sentences from video!')
|
||||
|
||||
tmp_path = os.path.join(self.tmp_dir, 'tmp')
|
||||
|
||||
Reference in New Issue
Block a user