TheEeeeLin commited on
Commit
45d8dd4
·
1 Parent(s): bc95f5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -277,15 +277,15 @@ def idphoto_inference(
277
 
278
 
279
  if __name__ == "__main__":
280
- # argparser = argparse.ArgumentParser()
281
- # argparser.add_argument(
282
- # "--port", type=int, default=7860, help="The port number of the server"
283
- # )
284
- # argparser.add_argument(
285
- # "--host", type=str, default="127.0.0.1", help="The host of the server"
286
- # )
287
 
288
- # args = argparser.parse_args()
289
 
290
  language = ["中文", "English"]
291
 
@@ -356,7 +356,7 @@ if __name__ == "__main__":
356
  matting_model_options = gr.Dropdown(
357
  choices=matting_model_list,
358
  label="Matting Model",
359
- value="hivision_modnet",
360
  elem_id="matting_model",
361
  )
362
 
@@ -624,4 +624,4 @@ if __name__ == "__main__":
624
  ],
625
  )
626
 
627
- demo.launch()
 
277
 
278
 
279
  if __name__ == "__main__":
280
+ argparser = argparse.ArgumentParser()
281
+ argparser.add_argument(
282
+ "--port", type=int, default=7860, help="The port number of the server"
283
+ )
284
+ argparser.add_argument(
285
+ "--host", type=str, default="127.0.0.1", help="The host of the server"
286
+ )
287
 
288
+ args = argparser.parse_args()
289
 
290
  language = ["中文", "English"]
291
 
 
356
  matting_model_options = gr.Dropdown(
357
  choices=matting_model_list,
358
  label="Matting Model",
359
+ value="modnet_photographic_portrait_matting",
360
  elem_id="matting_model",
361
  )
362
 
 
624
  ],
625
  )
626
 
627
+ demo.launch(server_name=args.host, server_port=args.port)