Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,7 @@ def check_server_ready():
|
|
63 |
return False
|
64 |
|
65 |
|
66 |
-
@spaces.GPU(duration=
|
67 |
def generate_image(prompt, image):
|
68 |
prompt = json.loads(prompt)
|
69 |
|
@@ -89,7 +89,7 @@ def generate_image(prompt, image):
|
|
89 |
start_queue(prompt)
|
90 |
|
91 |
# Ожидание нового изображения
|
92 |
-
timeout =
|
93 |
start_time = time.time()
|
94 |
while time.time() - start_time < timeout:
|
95 |
latest_image = get_latest_image(OUTPUT_DIR)
|
|
|
63 |
return False
|
64 |
|
65 |
|
66 |
+
@spaces.GPU(duration=240)
|
67 |
def generate_image(prompt, image):
|
68 |
prompt = json.loads(prompt)
|
69 |
|
|
|
89 |
start_queue(prompt)
|
90 |
|
91 |
# Ожидание нового изображения
|
92 |
+
timeout = 220 # Максимальное время ожидания в секундах
|
93 |
start_time = time.time()
|
94 |
while time.time() - start_time < timeout:
|
95 |
latest_image = get_latest_image(OUTPUT_DIR)
|