Inspecta commited on
Commit
c22b152
·
verified ·
1 Parent(s): deb5e76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,8 +9,8 @@ import subprocess, json, tempfile, sys
9
  COMFY_DIR = Path("ComfyUI")
10
  WORKFLOW_JSON = Path("workflow_api.json")
11
 
12
- # S'assurer que le dossier de logs existe et est visible par Hugging Face
13
- LOGS_DIR = Path("/tmp/logs")
14
  LOGS_DIR.mkdir(parents=True, exist_ok=True)
15
 
16
  def patch_workflow(wf, pic_path, face_path, prompt):
@@ -47,7 +47,7 @@ def run(picture, face, positive):
47
  "--workflow", str(tmp_wf)
48
  ], cwd=COMFY_DIR, capture_output=True, text=True)
49
 
50
- # Sauvegarder les logs dans un fichier visible
51
  log_file = LOGS_DIR / "comfy.txt"
52
  with open(log_file, "w") as f:
53
  f.write("=== STDOUT ===\n")
 
9
  COMFY_DIR = Path("ComfyUI")
10
  WORKFLOW_JSON = Path("workflow_api.json")
11
 
12
+ # Correction ici : logs en dossier local
13
+ LOGS_DIR = Path("logs")
14
  LOGS_DIR.mkdir(parents=True, exist_ok=True)
15
 
16
  def patch_workflow(wf, pic_path, face_path, prompt):
 
47
  "--workflow", str(tmp_wf)
48
  ], cwd=COMFY_DIR, capture_output=True, text=True)
49
 
50
+ # Sauvegarde des logs dans ./logs
51
  log_file = LOGS_DIR / "comfy.txt"
52
  with open(log_file, "w") as f:
53
  f.write("=== STDOUT ===\n")