MultimodalQnA Image and Audio Support Phase 1 (#1071)
Signed-off-by: Melanie Buehler <melanie.h.buehler@intel.com> Signed-off-by: okhleif-IL <omar.khleif@intel.com> Signed-off-by: dmsuehir <dina.s.jones@intel.com> Co-authored-by: Omar Khleif <omar.khleif@intel.com> Co-authored-by: dmsuehir <dina.s.jones@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Abolfazl Shahbazi <12436063+ashahba@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
dd9623d3d5
commit
bbc95bb708
@@ -5,6 +5,7 @@ import base64
|
||||
import logging
|
||||
import logging.handlers
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
@@ -118,6 +119,18 @@ def maintain_aspect_ratio_resize(image, width=None, height=None, inter=cv2.INTER
|
||||
return cv2.resize(image, dim, interpolation=inter)
|
||||
|
||||
|
||||
def make_temp_image(
|
||||
image_name,
|
||||
file_ext,
|
||||
output_image_path: str = "./public/images",
|
||||
output_image_name: str = "image_tmp",
|
||||
):
|
||||
Path(output_image_path).mkdir(parents=True, exist_ok=True)
|
||||
output_image = os.path.join(output_image_path, "{}.{}".format(output_image_name, file_ext))
|
||||
shutil.copy(image_name, output_image)
|
||||
return output_image
|
||||
|
||||
|
||||
# function to split video at a timestamp
|
||||
def split_video(
|
||||
video_path,
|
||||
|
||||
Reference in New Issue
Block a user