Spaces:
Sleeping
Sleeping
Fix Gradio 6.0: move css to launch(), disable SSR
Browse files
src/audio_video_generator/web/gradio_ui.py
CHANGED
|
@@ -238,7 +238,7 @@ def generate_video(
|
|
| 238 |
def create_ui() -> gr.Blocks:
|
| 239 |
"""Create Gradio UI."""
|
| 240 |
|
| 241 |
-
with gr.Blocks(title=f"Audio Video Generator v{__version__}"
|
| 242 |
gr.Markdown(
|
| 243 |
f"""
|
| 244 |
# Audio Video Generator v{__version__}
|
|
@@ -502,7 +502,13 @@ def launch_ui(host: str = "127.0.0.1", port: int = 7860, share: bool = False) ->
|
|
| 502 |
share: Whether to create a public link
|
| 503 |
"""
|
| 504 |
demo = create_ui()
|
| 505 |
-
demo.launch(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 506 |
|
| 507 |
|
| 508 |
if __name__ == "__main__":
|
|
|
|
| 238 |
def create_ui() -> gr.Blocks:
|
| 239 |
"""Create Gradio UI."""
|
| 240 |
|
| 241 |
+
with gr.Blocks(title=f"Audio Video Generator v{__version__}") as demo:
|
| 242 |
gr.Markdown(
|
| 243 |
f"""
|
| 244 |
# Audio Video Generator v{__version__}
|
|
|
|
| 502 |
share: Whether to create a public link
|
| 503 |
"""
|
| 504 |
demo = create_ui()
|
| 505 |
+
demo.launch(
|
| 506 |
+
server_name=host,
|
| 507 |
+
server_port=port,
|
| 508 |
+
share=share,
|
| 509 |
+
css=CUSTOM_CSS,
|
| 510 |
+
ssr_mode=False
|
| 511 |
+
)
|
| 512 |
|
| 513 |
|
| 514 |
if __name__ == "__main__":
|