add host args
This commit is contained in:
@@ -27,6 +27,12 @@ if __name__ == "__main__":
|
|||||||
default=8000,
|
default=8000,
|
||||||
help="Port to run the server on",
|
help="Port to run the server on",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--host",
|
||||||
|
type=str,
|
||||||
|
default="127.0.0.1",
|
||||||
|
help="Host to bind the server to",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--inference-backend",
|
"--inference-backend",
|
||||||
metavar="BACKEND",
|
metavar="BACKEND",
|
||||||
@@ -55,4 +61,4 @@ if __name__ == "__main__":
|
|||||||
encoding = load_harmony_encoding(HarmonyEncodingName.HARMONY_GPT_OSS)
|
encoding = load_harmony_encoding(HarmonyEncodingName.HARMONY_GPT_OSS)
|
||||||
|
|
||||||
infer_next_token = setup_model(args.checkpoint)
|
infer_next_token = setup_model(args.checkpoint)
|
||||||
uvicorn.run(create_api_server(infer_next_token, encoding), port=args.port)
|
uvicorn.run(create_api_server(infer_next_token, encoding), host=args.host, port=args.port)
|
||||||
|
|||||||
Reference in New Issue
Block a user