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."""
|
||||
css = get_custom_css()
|
||||
|
||||
# Create Blocks with compatible parameters
|
||||
try:
|
||||
# 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:
|
||||
# Create Blocks - use minimal params for compatibility
|
||||
with gr.Blocks(css=css) as app:
|
||||
# Header with VRAM monitor
|
||||
with gr.Row():
|
||||
with gr.Column(scale=4):
|
||||
|
||||
Reference in New Issue
Block a user