qnguyen3 commited on
Commit
7aff7d1
1 Parent(s): 781761b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -15
app.py CHANGED
@@ -538,18 +538,19 @@ if __name__ == "__main__":
538
  time.sleep(10)
539
  exit_status = 0
540
 
541
- demo = build_demo(args.embed)
542
- demo.launch(
543
- server_name=args.host,
544
- server_port=args.port,
545
- share=args.share,
546
- debug=True,
547
- max_threads=10)
548
- # )
549
- # except Exception as e:
550
- # print(e)
551
- # exit_status = 1
552
- # finally:
553
- # worker_proc.kill()
554
- # controller_proc.kill()
555
- # sys.exit(exit_status)
 
 
538
  time.sleep(10)
539
  exit_status = 0
540
 
541
+ try:
542
+ demo = build_demo(args.embed)
543
+ demo.launch(
544
+ server_name=args.host,
545
+ server_port=args.port,
546
+ share=args.share,
547
+ debug=True,
548
+ max_threads=10
549
+ )
550
+ except Exception as e:
551
+ print(e)
552
+ exit_status = 1
553
+ finally:
554
+ worker_proc.kill()
555
+ controller_proc.kill()
556
+ sys.exit(exit_status)