Spaces:
Running on Zero
Running on Zero
Fix Gradio 6 API: theme/css to launch(), drop show_download_button
Browse files
app.py
CHANGED
|
@@ -212,9 +212,11 @@ EXAMPLES = [
|
|
| 212 |
|
| 213 |
CSS = """
|
| 214 |
#col-container { max-width: 900px; margin: 0 auto; }
|
|
|
|
| 215 |
"""
|
| 216 |
|
| 217 |
-
|
|
|
|
| 218 |
with gr.Column(elem_id="col-container"):
|
| 219 |
gr.Markdown(
|
| 220 |
"""
|
|
@@ -243,7 +245,7 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
|
| 243 |
)
|
| 244 |
run_button = gr.Button("Generate", variant="primary")
|
| 245 |
|
| 246 |
-
video_out = gr.Video(label="Audio + video", autoplay=True
|
| 247 |
audio_out = gr.Audio(label="Audio track (48 kHz)")
|
| 248 |
|
| 249 |
with gr.Accordion("Advanced settings", open=False):
|
|
@@ -286,4 +288,4 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
|
| 286 |
outputs=[video_out, audio_out, seed, details_out],
|
| 287 |
)
|
| 288 |
|
| 289 |
-
demo.queue(max_size=8).launch(mcp_server=True)
|
|
|
|
| 212 |
|
| 213 |
CSS = """
|
| 214 |
#col-container { max-width: 900px; margin: 0 auto; }
|
| 215 |
+
.dark .gradio-container { color: var(--body-text-color); }
|
| 216 |
"""
|
| 217 |
|
| 218 |
+
# Gradio 6 moved `theme` / `css` from the Blocks constructor to `launch()`.
|
| 219 |
+
with gr.Blocks() as demo:
|
| 220 |
with gr.Column(elem_id="col-container"):
|
| 221 |
gr.Markdown(
|
| 222 |
"""
|
|
|
|
| 245 |
)
|
| 246 |
run_button = gr.Button("Generate", variant="primary")
|
| 247 |
|
| 248 |
+
video_out = gr.Video(label="Audio + video", autoplay=True)
|
| 249 |
audio_out = gr.Audio(label="Audio track (48 kHz)")
|
| 250 |
|
| 251 |
with gr.Accordion("Advanced settings", open=False):
|
|
|
|
| 288 |
outputs=[video_out, audio_out, seed, details_out],
|
| 289 |
)
|
| 290 |
|
| 291 |
+
demo.queue(max_size=8).launch(theme=gr.themes.Citrus(), css=CSS, mcp_server=True)
|