Update app.py
Browse files
app.py
CHANGED
@@ -59,27 +59,5 @@ def build_ui():
|
|
59 |
|
60 |
return app
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
parser.add_argument("--share", action="store_true", help="Enable public sharing")
|
65 |
-
parser.add_argument("--listen", action="store_true", help="Make WebUI reachable from local network")
|
66 |
-
parser.add_argument('--listen-host', type=str, default='0.0.0.0', help='Server hostname')
|
67 |
-
parser.add_argument('--listen-port', type=int, default=7860, help='Server port')
|
68 |
-
args = parser.parse_args()
|
69 |
-
|
70 |
-
try:
|
71 |
-
app = build_ui()
|
72 |
-
print("* launching WebUI....")
|
73 |
-
app.launch(
|
74 |
-
share=args.share,
|
75 |
-
server_name=args.listen_host if args.listen else '127.0.0.1',
|
76 |
-
server_port=args.listen_port,
|
77 |
-
favicon_path=os.path.join("assets", "favicon.ico"),
|
78 |
-
allowed_paths=[ALLOWED_DIR],
|
79 |
-
show_error=True,
|
80 |
-
max_file_size=CONFIG['max_upload_size_mb'] * 1024 * 1024
|
81 |
-
)
|
82 |
-
except Exception as e:
|
83 |
-
logger.error(f"Failed to launch application: {e}\n{format_exc()}")
|
84 |
-
print(f"Error launching application: {e}. Check neorvc.log for details.")
|
85 |
-
sys.exit(1)
|
|
|
59 |
|
60 |
return app
|
61 |
|
62 |
+
app.queue()
|
63 |
+
app.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|