Spaces:
Runtime error
Runtime error
get rid of ZERO checking loop
Browse files
app.py
CHANGED
@@ -19,14 +19,7 @@ def get_sdxl(prompt_in):
|
|
19 |
def infer(portrait_in, prompt_in):
|
20 |
# Generate Image from SDXL
|
21 |
gr.Info("Generating SDXL image first ...")
|
22 |
-
|
23 |
-
while True:
|
24 |
-
try:
|
25 |
-
sdxl_result = get_sdxl(prompt_in)
|
26 |
-
break # Exit the while loop if the operation succeeded
|
27 |
-
except Exception as e:
|
28 |
-
print(f"Operation failed with error: {e}")
|
29 |
-
time.sleep(10) # Wait for 5 seconds before attempting again
|
30 |
|
31 |
unique_id = str(uuid.uuid4())
|
32 |
|
|
|
19 |
def infer(portrait_in, prompt_in):
|
20 |
# Generate Image from SDXL
|
21 |
gr.Info("Generating SDXL image first ...")
|
22 |
+
sdxl_result = get_sdxl(prompt_in)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
unique_id = str(uuid.uuid4())
|
25 |
|