From 1513f1fefa163c83e45553b8fed74fee8c513faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Wed, 26 Nov 2025 23:11:18 +0100 Subject: [PATCH] Fix import errors and NumPy compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename create_theme() to create_audiocraft_theme() to match imports - Add missing get_custom_css() function - Pin numpy<2.0.0 for PyTorch compatibility - Replace deprecated pynvml with nvidia-ml-py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- requirements.txt | 4 ++-- src/ui/theme.py | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index bed6304..8bc3e48 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ uvicorn[standard]>=0.24.0 python-multipart>=0.0.6 # GPU Monitoring -pynvml>=11.5.0 +nvidia-ml-py>=12.535.0 # Replaces deprecated pynvml # Storage aiosqlite>=0.19.0 @@ -24,7 +24,7 @@ pydantic-settings>=2.1.0 pyyaml>=6.0 # Audio Processing -numpy>=1.24.0 +numpy>=1.24.0,<2.0.0 # NumPy 2.x incompatible with current PyTorch scipy>=1.11.0 librosa>=0.10.0 soundfile>=0.12.0 diff --git a/src/ui/theme.py b/src/ui/theme.py index 5b87905..acc4444 100644 --- a/src/ui/theme.py +++ b/src/ui/theme.py @@ -3,7 +3,7 @@ import gradio as gr -def create_theme() -> gr.themes.Base: +def create_audiocraft_theme() -> gr.themes.Base: """Create custom theme for AudioCraft Studio. Returns: @@ -301,3 +301,12 @@ CUSTOM_CSS = """ } } """ + + +def get_custom_css() -> str: + """Get custom CSS for additional styling. + + Returns: + CSS string + """ + return CUSTOM_CSS