Spaces:
Runtime error
Runtime error
Download vms/utils/base_tab.py from vimalvskl7/VideoModelStudio: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/spaces/vimalvskl7/VideoModelStudio/resolve/main/vms/utils/base_tab.py
- Command line
-
hf download hf://spaces/vimalvskl7/VideoModelStudio/vms/utils/base_tab.py
-
curl -L -o base_tab.py https://huggingface.co/spaces/vimalvskl7/VideoModelStudio/resolve/main/vms/utils/base_tab.py
1.17 kB
| """ | |
| Base class for UI tabs | |
| """ | |
| import gradio as gr | |
| import logging | |
| from typing import Dict, Any, Optional | |
| logger = logging.getLogger(__name__) | |
| class BaseTab: | |
| """Base class for UI tabs with common functionality""" | |
| def __init__(self, app_state): | |
| """Initialize the tab with app state reference | |
| Args: | |
| app_state: Reference to main AppUI instance | |
| """ | |
| self.app = app_state | |
| self.components = {} | |
| def create(self, parent=None) -> gr.TabItem: | |
| """Create the tab UI components | |
| Args: | |
| parent: Optional parent container | |
| Returns: | |
| The created tab component | |
| """ | |
| raise NotImplementedError("Subclasses must implement create()") | |
| def connect_events(self) -> None: | |
| """Connect event handlers to UI components""" | |
| raise NotImplementedError("Subclasses must implement connect_events()") | |
| def refresh(self) -> Dict[str, Any]: | |
| """Refresh UI components with current data | |
| Returns: | |
| Dictionary with updated values for components | |
| """ | |
| return {} |