enable inbrowser in webui
This commit is contained in:
parent
d77bed4091
commit
694a05fd04
|
@ -73,10 +73,10 @@ def create_web_demo() -> gr.Blocks:
|
|||
def run_web_ui() -> None:
|
||||
gradio_share = os.environ.get("GRADIO_SHARE", "0").lower() in ["true", "1"]
|
||||
server_name = os.environ.get("GRADIO_SERVER_NAME", "0.0.0.0")
|
||||
create_ui().queue().launch(share=gradio_share, server_name=server_name)
|
||||
create_ui().queue().launch(share=gradio_share, server_name=server_name, inbrowser=True)
|
||||
|
||||
|
||||
def run_web_demo() -> None:
|
||||
gradio_share = os.environ.get("GRADIO_SHARE", "0").lower() in ["true", "1"]
|
||||
server_name = os.environ.get("GRADIO_SERVER_NAME", "0.0.0.0")
|
||||
create_web_demo().queue().launch(share=gradio_share, server_name=server_name)
|
||||
create_web_demo().queue().launch(share=gradio_share, server_name=server_name, inbrowser=True)
|
||||
|
|
|
@ -6,7 +6,7 @@ from llamafactory.webui.interface import create_ui
|
|||
def main():
|
||||
gradio_share = os.environ.get("GRADIO_SHARE", "0").lower() in ["true", "1"]
|
||||
server_name = os.environ.get("GRADIO_SERVER_NAME", "0.0.0.0")
|
||||
create_ui().queue().launch(share=gradio_share, server_name=server_name)
|
||||
create_ui().queue().launch(share=gradio_share, server_name=server_name, inbrowser=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue