fix error in applying host port to gradio

#12
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
  )