Fix: Pass launch kwargs to Gradio's demo.launch()#4
Merged
abidlabs merged 2 commits intogradio-app:mainfrom Feb 27, 2026
Merged
Fix: Pass launch kwargs to Gradio's demo.launch()#4abidlabs merged 2 commits intogradio-app:mainfrom
abidlabs merged 2 commits intogradio-app:mainfrom
Conversation
Member
|
Thanks @Mandark-droid! This is looks fine, but would it be possible for you to actually explicitly add the arguments you want in |
Add explicit share and server_port parameters to Toolset.launch() and launch_gradio_ui() for type hints and IDE autocompletion.
53dc2c2 to
af92367
Compare
Member
🪼 branch checks and previews
|
Member
🦄 change detectedThis Pull Request includes changes to the following packages.
|
Contributor
Author
|
Hi @abidlabs, thanks for the feedback! I've updated the PR to add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
**launch_kwargsparameter toToolset.launch()methodlaunch_gradio_ui()and finally todemo.launch()Problem
Previously, calling
toolset.launch(share=True)would raise:Solution
The
launch()method now accepts and passes through any Gradio launch kwargs:Changes
toolsets/toolset.py: Added**launch_kwargstolaunch()method and updated docstringtoolsets/gradio_ui.py: Added**launch_kwargstolaunch_gradio_ui()and passed todemo.launch()Test Plan
toolset.launch(share=True)creates a public linktoolset.launch(server_port=8080)uses custom port