KEYE commited on
Commit
25e3230
·
verified ·
1 Parent(s): b5d9dd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -7,9 +7,9 @@ def setup_and_run():
7
  repo_url = "https://github.com/renkexuan369/Infinity-Parser2-pro.git"
8
  repo_dir = "Infinity-Parser2-pro"
9
 
10
- # ==========================================
11
  # 1. 动态获取/拉取最新代码
12
- # ==========================================
13
  if not os.path.exists(repo_dir):
14
  logger.info(f"正在克隆仓库: {repo_url}")
15
  subprocess.run(["git", "clone", repo_url], check=True)
@@ -24,9 +24,9 @@ def setup_and_run():
24
  os.environ["GRADIO_SERVER_PORT"] = "7860"
25
  os.environ["GRADIO_SERVER_NAME"] = "0.0.0.0"
26
 
27
- # ==========================================
28
  # 2. 启动 Gradio 服务
29
- # ==========================================
30
  logger.info("准备启动 inf_gradio.py ...")
31
 
32
  # 关键:必须设置 cwd=repo_dir,否则 Python 找不到 utils.py 和 prompts.py
 
7
  repo_url = "https://github.com/renkexuan369/Infinity-Parser2-pro.git"
8
  repo_dir = "Infinity-Parser2-pro"
9
 
10
+ # =========================================
11
  # 1. 动态获取/拉取最新代码
12
+ # =========================================
13
  if not os.path.exists(repo_dir):
14
  logger.info(f"正在克隆仓库: {repo_url}")
15
  subprocess.run(["git", "clone", repo_url], check=True)
 
24
  os.environ["GRADIO_SERVER_PORT"] = "7860"
25
  os.environ["GRADIO_SERVER_NAME"] = "0.0.0.0"
26
 
27
+ # =========================================
28
  # 2. 启动 Gradio 服务
29
+ # =========================================
30
  logger.info("准备启动 inf_gradio.py ...")
31
 
32
  # 关键:必须设置 cwd=repo_dir,否则 Python 找不到 utils.py 和 prompts.py