Allow Gradio share parameter passthrough (#490)

Co-authored-by: Aymeric Roucher <69208727+aymeric-roucher@users.noreply.github.com>
This commit is contained in:
Alex 2025-02-13 13:41:56 +01:00 committed by GitHub
parent cfe599c54a
commit b9e94381af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -258,7 +258,7 @@ class GradioUI:
"", "",
) )
def launch(self, **kwargs): def launch(self, share: bool = False, **kwargs):
import gradio as gr import gradio as gr
with gr.Blocks(fill_height=True) as demo: with gr.Blocks(fill_height=True) as demo:
@ -290,7 +290,7 @@ class GradioUI:
[stored_messages, text_input], [stored_messages, text_input],
).then(self.interact_with_agent, [stored_messages, chatbot], [chatbot]) ).then(self.interact_with_agent, [stored_messages, chatbot], [chatbot])
demo.launch(debug=True, share=True, **kwargs) demo.launch(debug=True, share=share, **kwargs)
__all__ = ["stream_to_gradio", "GradioUI"] __all__ = ["stream_to_gradio", "GradioUI"]