modularize launch

This commit is contained in:
Vladimir Mandic
2024-02-16 16:34:53 -05:00
parent 8caa82204c
commit a01b5fc00d
2 changed files with 6 additions and 2 deletions
-1
View File
@@ -16,4 +16,3 @@ Main ToDo list can be found at [GitHub projects](https://github.com/users/vladma
- second pass: <https://github.com/vladmandic/automatic/issues/2783>
- control api
- masking api
- inpaint pan/zoom
+6 -1
View File
@@ -180,7 +180,8 @@ def start_server(immediate=True, server=None):
return uvicorn, server
if __name__ == "__main__":
def main():
global args # pylint: disable=global-statement
installer.ensure_base_requirements()
init_args() # setup argparser and default folders
installer.args = args
@@ -255,3 +256,7 @@ if __name__ == "__main__":
installer.log.info('Exiting...')
break
time.sleep(1)
if __name__ == "__main__":
main()