Fixed #1 by changing import statement, using factory function, and pinning the llama-cpp-python to 0.1.48

This commit is contained in:
Julian 2023-05-11 08:35:56 +02:00
parent b1da9fb0e9
commit 7154fc276d
2 changed files with 4 additions and 3 deletions

View file

@ -16,6 +16,7 @@ if __name__ == "__main__":
# Set environment variable before importing api server # Set environment variable before importing api server
environ["MODEL"] = args.model environ["MODEL"] = args.model
# Import api server # Import api server
from llama_cpp.server import __main__ as server from llama_cpp.server.app import create_app
# Run # Run
uvicorn.run(server.app, host=args.host, port=args.port) app = create_app()
uvicorn.run(app, host=args.host, port=args.port)

View file

@ -1,3 +1,3 @@
llama-cpp-python[server]~=0.1.39 llama-cpp-python[server]==0.1.48
uvicorn~=0.22.0 uvicorn~=0.22.0
sanic~=23.3.0 sanic~=23.3.0