From d5c0009da4be437ca28756b5ba6ef1de6004d3e7 Mon Sep 17 00:00:00 2001 From: Taiga Takano Date: Mon, 9 Dec 2024 00:02:11 +0900 Subject: [PATCH] fix format --- app-x.py | 2 +- horus/project_manager.py | 2 +- horus/util.py | 3 ++- horus/video_processing.py | 5 ++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app-x.py b/app-x.py index 6ee0365..9db8362 100644 --- a/app-x.py +++ b/app-x.py @@ -8,7 +8,7 @@ with gr.Column(): input_videos = gr.File(label="Upload Video", file_count="multiple", file_types=[".mp4", ".mov", ".mpg"]) input_project_name = gr.Text(label="Project Name") - + upload_button = gr.Button("Start Upload") with gr.Column(): output_status = gr.Text(label="Status") diff --git a/horus/project_manager.py b/horus/project_manager.py index 709197d..b6571fc 100644 --- a/horus/project_manager.py +++ b/horus/project_manager.py @@ -19,4 +19,4 @@ def make_project(project_name: str, project_host_dir="/workspace/horus_inference yaml.dump(project_data, f, default_flow_style=False, allow_unicode=True) print(f"プロジェクトファイルが作成されました: {project_description_file_path}") - return project_dir \ No newline at end of file + return project_dir diff --git a/horus/util.py b/horus/util.py index 8592023..c7ae6c4 100644 --- a/horus/util.py +++ b/horus/util.py @@ -49,8 +49,9 @@ def video_to_images(video_path: str): return output_dir + def natural_sort(file_list): def alphanum_key(key): filename = os.path.basename(key) return [int(text) if text.isdigit() else text for text in re.split(r'(\d+)', filename)] - return sorted(file_list, key=alphanum_key) \ No newline at end of file + return sorted(file_list, key=alphanum_key) diff --git a/horus/video_processing.py b/horus/video_processing.py index fa51b30..265173b 100644 --- a/horus/video_processing.py +++ b/horus/video_processing.py @@ -16,7 +16,7 @@ def make_video_list_file(video_files: list[str]): video_path = p.resolve() f.write(f"file '{video_path}'\n") - + return file_name @@ -31,7 +31,7 @@ def run_ffmpeg_concat_av1(input_list: str, output_file: str, preset="fast"): "-b:v", "500k", output_file ] - + try: result = subprocess.run(command, check=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) print("ffmpegコマンドの実行に成功しました。") @@ -76,4 +76,3 @@ def video_processing_ui(video_files: list[str], project_name: str): run_ffmpeg_timelaps_av1(merge_video_path, timelaps_video_path, 15 * 60) return video_files -