Spaces:
Running
Running
""" | |
定义项目中使用的数据类型 | |
""" | |
from typing import List, Dict, Optional | |
from dataclasses import dataclass | |
class PlotPoint: | |
timestamp: str | |
title: str | |
picture: str | |
class Commentary: | |
timestamp: str | |
title: str | |
copywriter: str | |
class SubtitleSegment: | |
start_time: float | |
end_time: float | |
text: str | |
class ScriptItem: | |
timestamp: str | |
title: str | |
picture: str | |
copywriter: str | |
class PipelineResult: | |
output_video_path: str | |
plot_points: List[PlotPoint] | |
subtitle_segments: List[SubtitleSegment] | |
commentaries: List[Commentary] | |
final_script: List[ScriptItem] | |
error: Optional[str] = None | |
class VideoProcessingError(Exception): | |
pass | |
class SubtitleProcessingError(Exception): | |
pass | |
class PlotAnalysisError(Exception): | |
pass | |
class CopywritingError(Exception): | |
pass | |