Update to Gradio 6.x API
- Move css from gr.Blocks() to launch() - Replace show_api with footer_links parameter - Remove theme from Blocks (moved to launch in Gradio 6) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -190,10 +190,9 @@ class AudioCraftApp:
|
||||
|
||||
def build(self) -> gr.Blocks:
|
||||
"""Build the Gradio application."""
|
||||
css = get_custom_css()
|
||||
|
||||
# Create Blocks - use minimal params for compatibility
|
||||
with gr.Blocks(css=css) as app:
|
||||
# In Gradio 6.x, theme/css moved to launch()
|
||||
# Create Blocks with no styling params
|
||||
with gr.Blocks() as app:
|
||||
# Header with VRAM monitor
|
||||
with gr.Row():
|
||||
with gr.Column(scale=4):
|
||||
@@ -307,11 +306,14 @@ class AudioCraftApp:
|
||||
if self.app is None:
|
||||
self.build()
|
||||
|
||||
# Gradio 6.x: theme/css go in launch()
|
||||
css = get_custom_css()
|
||||
|
||||
self.app.launch(
|
||||
server_name=server_name or self.settings.host,
|
||||
server_port=server_port or self.settings.gradio_port,
|
||||
share=share,
|
||||
show_error=True,
|
||||
css=css,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user