Fix Gradio 6.0 compatibility: remove show_api, move css to launch()
This commit is contained in:
+2
-2
@@ -144,9 +144,9 @@ def create_app():
|
|||||||
footer_html = f.read()
|
footer_html = f.read()
|
||||||
|
|
||||||
# Build Gradio interface
|
# Build Gradio interface
|
||||||
|
# In Gradio 6.0+, css must be passed to launch(), not Blocks()
|
||||||
with gr.Blocks(
|
with gr.Blocks(
|
||||||
title="A.P.Strom Transcription",
|
title="A.P.Strom Transcription",
|
||||||
css="body { font-family: Arial, sans-serif; }",
|
|
||||||
) as app:
|
) as app:
|
||||||
|
|
||||||
# Header
|
# Header
|
||||||
@@ -267,7 +267,7 @@ def create_app():
|
|||||||
server_name=str(server_name),
|
server_name=str(server_name),
|
||||||
server_port=int(server_port),
|
server_port=int(server_port),
|
||||||
favicon_path=favicon_path if os.path.exists(favicon_path) else None,
|
favicon_path=favicon_path if os.path.exists(favicon_path) else None,
|
||||||
show_api=False,
|
css="body { font-family: Arial, sans-serif; }",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user