qnguyen3 commited on
Commit
4be8019
1 Parent(s): dd28a0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -18
app.py CHANGED
@@ -516,7 +516,6 @@ if __name__ == "__main__":
516
  parser = argparse.ArgumentParser()
517
  parser.add_argument("--host", type=str, default="127.0.0.1")
518
  parser.add_argument("--port", type=int)
519
- parser.add_argument("--controller-url", type=str, default="http://localhost:21001")
520
  parser.add_argument("--concurrency-count", type=int, default=10)
521
  parser.add_argument("--model-list-mode", type=str, default="once",
522
  choices=["once", "reload"])
@@ -529,7 +528,6 @@ if __name__ == "__main__":
529
  models = get_model_list()
530
  logger.info(args)
531
 
532
- model_path = os.getenv("model", "liuhaotian/llava-v1.6-mistral-7b")
533
  concurrency_count = int(os.getenv("concurrency_count", 5))
534
 
535
  controller_proc = start_controller()
@@ -537,19 +535,19 @@ if __name__ == "__main__":
537
  worker_proc = start_worker(model_path)
538
  time.sleep(10)
539
  exit_status = 0
540
- try:
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)
 
516
  parser = argparse.ArgumentParser()
517
  parser.add_argument("--host", type=str, default="127.0.0.1")
518
  parser.add_argument("--port", type=int)
 
519
  parser.add_argument("--concurrency-count", type=int, default=10)
520
  parser.add_argument("--model-list-mode", type=str, default="once",
521
  choices=["once", "reload"])
 
528
  models = get_model_list()
529
  logger.info(args)
530
 
 
531
  concurrency_count = int(os.getenv("concurrency_count", 5))
532
 
533
  controller_proc = start_controller()
 
535
  worker_proc = start_worker(model_path)
536
  time.sleep(10)
537
  exit_status = 0
538
+
539
+ demo = build_demo(args.embed)
540
+ demo.launch(
541
+ server_name=args.host,
542
+ server_port=args.port,
543
+ share=args.share,
544
+ debug=True,
545
+ max_threads=10)
546
+ # )
547
+ # except Exception as e:
548
+ # print(e)
549
+ # exit_status = 1
550
+ # finally:
551
+ # worker_proc.kill()
552
+ # controller_proc.kill()
553
+ # sys.exit(exit_status)