Allow Gradio share parameter passthrough (#490)
Co-authored-by: Aymeric Roucher <69208727+aymeric-roucher@users.noreply.github.com>
This commit is contained in:
parent
cfe599c54a
commit
b9e94381af
|
@ -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"]
|
||||||
|
|
Loading…
Reference in New Issue