Simplify gr.Blocks for older Gradio compatibility
Remove theme and title params that aren't supported in older versions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -192,19 +192,8 @@ class AudioCraftApp:
|
|||||||
"""Build the Gradio application."""
|
"""Build the Gradio application."""
|
||||||
css = get_custom_css()
|
css = get_custom_css()
|
||||||
|
|
||||||
# Create Blocks with compatible parameters
|
# Create Blocks - use minimal params for compatibility
|
||||||
try:
|
with gr.Blocks(css=css) as app:
|
||||||
# Gradio 4.x
|
|
||||||
app = gr.Blocks(
|
|
||||||
theme=gr.themes.Soft(),
|
|
||||||
css=css,
|
|
||||||
title="AudioCraft Studio",
|
|
||||||
)
|
|
||||||
except TypeError:
|
|
||||||
# Fallback for older Gradio versions
|
|
||||||
app = gr.Blocks(css=css)
|
|
||||||
|
|
||||||
with app:
|
|
||||||
# Header with VRAM monitor
|
# Header with VRAM monitor
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
with gr.Column(scale=4):
|
with gr.Column(scale=4):
|
||||||
|
|||||||
Reference in New Issue
Block a user