Freak-ppa commited on
Commit
d0e3e59
·
verified ·
1 Parent(s): b4ce6db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -68,7 +68,7 @@ def generate_image(prompt, image):
68
  # Запускаем скрипт как подпроцесс
69
  process = subprocess.Popen([sys.executable, COMF_PATH, "--listen", "127.0.0.1"])
70
  logger.debug(f'Subprocess started with PID: {process.pid}')
71
-
72
  try:
73
  # Ожидание запуска сервера
74
  for _ in range(20): # Максимум 20 секунд ожидания
@@ -103,8 +103,8 @@ def generate_image(prompt, image):
103
  except subprocess.TimeoutExpired:
104
  process.kill()
105
 
106
- logger.error("No new image was generated")
107
- return None
108
 
109
 
110
  if __name__ == "__main__":
 
68
  # Запускаем скрипт как подпроцесс
69
  process = subprocess.Popen([sys.executable, COMF_PATH, "--listen", "127.0.0.1"])
70
  logger.debug(f'Subprocess started with PID: {process.pid}')
71
+ latest_image = None
72
  try:
73
  # Ожидание запуска сервера
74
  for _ in range(20): # Максимум 20 секунд ожидания
 
103
  except subprocess.TimeoutExpired:
104
  process.kill()
105
 
106
+ #logger.error("No new image was generated")
107
+ return latest_image
108
 
109
 
110
  if __name__ == "__main__":