""" VoiceForge - Processing Animation Component Premium animated loading states with time tracking """ import streamlit as st import time def render_processing_animation(title: str = "PROCESSING", step: str = "Initializing...", progress: int = 0, elapsed_time: float = 0): """ Render a premium ROG-style processing animation with time tracking. Args: title: Main title to display step: Current step description progress: Progress percentage (0-100) elapsed_time: Time elapsed in seconds """ # Format elapsed time minutes = int(elapsed_time // 60) seconds = int(elapsed_time % 60) time_str = f"{minutes:02d}:{seconds:02d}" # Calculate gradient position based on progress gradient_pos = progress * 3.6 # For rotation effect st.markdown(f"""
""", unsafe_allow_html=True) def render_success_animation(title: str = "COMPLETE", subtitle: str = "Processing finished successfully", stats: dict = None): """ Render a success state animation. Args: title: Success title subtitle: Description text stats: Dictionary of stats to display (e.g., {"Speakers": 3, "Segments": 135}) """ stats_html = "" if stats: stats_items = [] for key, value in stats.items(): stats_items.append(f"""