mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
Main: Switch to entrypoint
Allows for other modules to access the startup function. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
8
main.py
8
main.py
@@ -476,7 +476,10 @@ async def generate_chat_completion(request: Request, data: ChatCompletionRequest
|
||||
return response
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def entrypoint():
|
||||
"""Entry function for program startup"""
|
||||
global MODEL_CONTAINER
|
||||
|
||||
# Load from YAML config
|
||||
read_config_from_file(pathlib.Path("config.yml"))
|
||||
|
||||
@@ -522,3 +525,6 @@ if __name__ == "__main__":
|
||||
port=network_config.get("port", 5000),
|
||||
log_level="debug",
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
entrypoint()
|
||||
|
||||
Reference in New Issue
Block a user