Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
add cli
Bruce MacDonaldfcf15df1ef6e
diff --git a/README.md b/README.mdindex 8cdc1fe33..dd8f34e3a 100644--- a/README.md+++ b/README.md@@ -13,7 +13,7 @@ pip install -r requirements.txtPut your model in `models/` and run:```-python proto.py+python3 proto.py serve```To run the app:diff --git a/proto.py b/proto.pyindex be99550e3..0292c2011 100644--- a/proto.py+++ b/proto.py@@ -1,6 +1,7 @@import jsonimport osimport threading+import clickfrom llama_cpp import Llamafrom flask import Flask, Response, stream_with_context, requestfrom flask_cors import CORS@@ -100,6 +101,21 @@ def models_route_handler():return Response(json.dumps(bin_files), mimetype="application/json")[email protected](invoke_without_command=True)[email protected]_context+def cli(ctx):+ # allows the script to respond to command line input when executed directly+ if ctx.invoked_subcommand is None:+ click.echo(ctx.get_help())++[email protected]("--port", default=5000, help="Port to run the server on")[email protected]("--debug", default=False, help="Enable debug mode")+def serve(port, debug):+ print("Serving on http://localhost:{port}")+ app.run(host="0.0.0.0", port=port, debug=debug)++if __name__ == "__main__":- app.run(debug=True, threaded=True, port=5001)- app.run()+ cli()