mirror of
https://github.com/SWivid/F5-TTS.git
synced 2025-12-12 15:50:07 -08:00
feat: Add autolaunch option to Gradio interface
This commit is contained in:
@@ -875,10 +875,19 @@ If you're having issues, try converting your reference audio to WAV or MP3, clip
|
||||
type=str,
|
||||
help='The root path (or "mount point") of the application, if it\'s not served from the root ("/") of the domain. Often used when the application is behind a reverse proxy that forwards requests to the application, e.g. set "/myapp" or full URL for application served at "https://example.com/myapp".',
|
||||
)
|
||||
def main(port, host, share, api, root_path):
|
||||
@click.option(
|
||||
"--autolaunch",
|
||||
"-l",
|
||||
is_flag=True,
|
||||
default=False,
|
||||
help="Automatically launch the interface in the default web browser",
|
||||
)
|
||||
def main(port, host, share, api, root_path, autolaunch):
|
||||
global app
|
||||
print("Starting app...")
|
||||
app.queue(api_open=api).launch(server_name=host, server_port=port, share=share, show_api=api, root_path=root_path)
|
||||
app.queue(api_open=api).launch(
|
||||
server_name=host, server_port=port, share=share, show_api=api, root_path=root_path, inbrowser=autolaunch
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user