Fix import errors and NumPy compatibility
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user