avoigt1121 Claude Opus 4.8 commited on
Commit
5ba3350
·
1 Parent(s): b4e7ac0

gradio 6 migration: drop show_api from launch() (removed in 6.0)

Browse files

The first migration commit (b4e7ac0) crashed at startup on the dev Space:
`TypeError: Blocks.launch() got an unexpected keyword argument 'show_api'`.
gradio 6.0 removed show_api from launch(). Local verification had only built
create_app() + inspected the launch signature for theme/css; it never actually
called launch(). Now verified by really launching the app (prevent_thread_lock)
and confirming it binds and returns HTTP 200 on gradio 6.18.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Files changed (1) hide show
  1. gradio_ui.py +2 -1
gradio_ui.py CHANGED
@@ -1086,4 +1086,5 @@ class GradioAgentUI(_UIFormattingMixin):
1086
  # Gradio 6.0 moved theme + css off the Blocks() constructor onto launch().
1087
  kwargs.setdefault('theme', self._gradio_theme())
1088
  kwargs.setdefault('css', self._GRADIO_CSS)
1089
- app.queue(max_size=10).launch(share=share, show_api=False, favicon_path=None, **kwargs)
 
 
1086
  # Gradio 6.0 moved theme + css off the Blocks() constructor onto launch().
1087
  kwargs.setdefault('theme', self._gradio_theme())
1088
  kwargs.setdefault('css', self._GRADIO_CSS)
1089
+ # gradio 6.0 removed the show_api argument from launch().
1090
+ app.queue(max_size=10).launch(share=share, favicon_path=None, **kwargs)