diff --git a/web/app.py b/web/app.py index 696f2be..546f035 100644 --- a/web/app.py +++ b/web/app.py @@ -1072,6 +1072,10 @@ def main(): progress_bar = st.progress(0) status_text = st.empty() + # Record start time for generation + import time + start_time = time.time() + try: # Progress callback to update UI def update_progress(event: ProgressEvent): @@ -1137,6 +1141,9 @@ def main(): result = run_async(pixelle_video.generate_video(**video_params)) + # Calculate total generation time + total_generation_time = time.time() - start_time + progress_bar.progress(100) status_text.text(tr("status.success")) @@ -1154,7 +1161,7 @@ def main(): video_width, video_height = parse_template_size(template_path) info_text = ( - f"⏱️ {result.duration:.1f}s " + f"⏱️ {tr('info.generation_time')} {total_generation_time:.1f}s " f"📦 {file_size_mb:.2f}MB " f"🎬 {len(result.storyboard.frames)}{tr('info.scenes_unit')} " f"📐 {video_width}x{video_height}" diff --git a/web/i18n/locales/en_US.json b/web/i18n/locales/en_US.json index ab0df9d..d547e00 100644 --- a/web/i18n/locales/en_US.json +++ b/web/i18n/locales/en_US.json @@ -160,6 +160,7 @@ "info.resolution": "Resolution", "info.video_information": "📊 Video Information", "info.no_video_yet": "Video preview will appear here after generation", + "info.generation_time": "Generation Time", "settings.title": "⚙️ System Configuration (Required)", "settings.not_configured": "⚠️ Please complete system configuration before generating videos", diff --git a/web/i18n/locales/zh_CN.json b/web/i18n/locales/zh_CN.json index 9d3e801..a54a885 100644 --- a/web/i18n/locales/zh_CN.json +++ b/web/i18n/locales/zh_CN.json @@ -160,6 +160,7 @@ "info.resolution": "分辨率", "info.video_information": "📊 视频信息", "info.no_video_yet": "生成视频后,预览将显示在这里", + "info.generation_time": "生成耗时", "settings.title": "⚙️ 系统配置(必需)", "settings.not_configured": "⚠️ 请先完成系统配置才能生成视频",