Update app.py
Browse files
app.py
CHANGED
|
@@ -320,7 +320,7 @@ def generate_designs(selected_suggestion, progress=gr.Progress()):
|
|
| 320 |
logger.error("无法生成设计:Stable Diffusion 模型未加载")
|
| 321 |
# 创建占位图像
|
| 322 |
for i in range(3):
|
| 323 |
-
color = (random.randint(120, 200), random.randint(120, 200), random.randint(120, 200)
|
| 324 |
img = Image.new('RGB', (512, 512), color=color)
|
| 325 |
design_images.append(img)
|
| 326 |
design_choices.append(f"{selected_suggestion} - 方案 {i+1} (模型未加载)")
|
|
@@ -351,7 +351,7 @@ def generate_designs(selected_suggestion, progress=gr.Progress()):
|
|
| 351 |
logger.error(f"生成设计 {i+1} 失败: {gen_e}")
|
| 352 |
# 创建占位图像
|
| 353 |
width, height = 512, 512
|
| 354 |
-
color = (random.randint(120, 200), random.randint(120, 200), random.randint(120, 200)
|
| 355 |
image = Image.new('RGB', (width, height), color=color)
|
| 356 |
|
| 357 |
if image:
|
|
|
|
| 320 |
logger.error("无法生成设计:Stable Diffusion 模型未加载")
|
| 321 |
# 创建占位图像
|
| 322 |
for i in range(3):
|
| 323 |
+
color = (random.randint(120, 200), random.randint(120, 200), random.randint(120, 200))
|
| 324 |
img = Image.new('RGB', (512, 512), color=color)
|
| 325 |
design_images.append(img)
|
| 326 |
design_choices.append(f"{selected_suggestion} - 方案 {i+1} (模型未加载)")
|
|
|
|
| 351 |
logger.error(f"生成设计 {i+1} 失败: {gen_e}")
|
| 352 |
# 创建占位图像
|
| 353 |
width, height = 512, 512
|
| 354 |
+
color = (random.randint(120, 200), random.randint(120, 200), random.randint(120, 200))
|
| 355 |
image = Image.new('RGB', (width, height), color=color)
|
| 356 |
|
| 357 |
if image:
|