Surn nguyenlamvu123 commited on
Commit
9273d99
1 Parent(s): 7bc2931

fix error in applying host port to gradio (#12)

Browse files

- - fix error in applying host port to gradio (7615c80cffa78cf4a16f25b03146b41afa0cb131)


Co-authored-by: Nguyễn Lâm Vũ <[email protected]>

Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -518,7 +518,7 @@ if __name__ == "__main__":
518
  args = parser.parse_args()
519
 
520
  launch_kwargs = {}
521
- launch_kwargs['server_name'] = args.listen
522
 
523
  if args.username and args.password:
524
  launch_kwargs['auth'] = (args.username, args.password)
@@ -538,5 +538,6 @@ if __name__ == "__main__":
538
 
539
  ui(
540
  unload_to_cpu = MOVE_TO_CPU,
541
- share=args.share
 
542
  )
 
518
  args = parser.parse_args()
519
 
520
  launch_kwargs = {}
521
+ launch_kwargs['listen'] = args.listen
522
 
523
  if args.username and args.password:
524
  launch_kwargs['auth'] = (args.username, args.password)
 
538
 
539
  ui(
540
  unload_to_cpu = MOVE_TO_CPU,
541
+ share=args.share,
542
+ **launch_kwargs,
543
  )