0xZohar commited on
Commit
0d1f955
·
verified ·
1 Parent(s): bdd1d56

Upload code/demo.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. code/demo.py +3 -1
code/demo.py CHANGED
@@ -514,9 +514,11 @@ if __name__ == "__main__":
514
 
515
  if is_hf_space:
516
  print("🌐 运行环境: Hugging Face Spaces")
517
- # Hugging Face Spaces 会自动处理端口和公开访问
518
  demo.queue()
519
  demo.launch(
 
 
520
  show_error=True,
521
  allowed_paths=[os.path.abspath(DEFAULT_PART_RENDER_PATH)]
522
  )
 
514
 
515
  if is_hf_space:
516
  print("🌐 运行环境: Hugging Face Spaces")
517
+ # Hugging Face Spaces Docker SDK 需要显式指定端口
518
  demo.queue()
519
  demo.launch(
520
+ server_name="0.0.0.0",
521
+ server_port=7860,
522
  show_error=True,
523
  allowed_paths=[os.path.abspath(DEFAULT_PART_RENDER_PATH)]
524
  )