Skip to content

CLI way of launching default ChatInterface (load_chat) #11334

@vadimkantorov

Description

@vadimkantorov

Rather than having to code up two-LOC python script as advised here: https://www.gradio.app/guides/creating-a-chatbot-fast#note-for-open-ai-api-compatible-endpoints

It would be nice to be able to fire up such most-basic chatbot interfaces using CLI with documented CLI arguments: python -m gradio openaichat --share --host ... --port ... or gradio openaichat --share --host ... --port .... The killer feature would be the --share option.

Currently it might be possible with a clutch:
python -c 'import sys, gradio as gr; gr.load_chat("http://{host}:{port}/v1/".format(host = sys.argv[-2], port = sys.argv[-1]), model=sys.argv[-3], token="***").launch(share=True)' "Qwen/Qwen3-8B" "127.0.0.1" "8080"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions