Spaces:
Sleeping
Sleeping
sanbo
commited on
Commit
·
e26becc
1
Parent(s):
a8b1053
update sth. at 2024-11-15 19:04:11
Browse files
app.py
CHANGED
@@ -40,10 +40,16 @@ def image_gen(prompt):
|
|
40 |
"""
|
41 |
try:
|
42 |
# 使用服务一 (默认模型)
|
|
|
43 |
image_1 = client_image_1.text_to_image(prompt)
|
|
|
|
|
44 |
|
45 |
# 使用服务二 (FLUX 模型)
|
|
|
46 |
image_2 = client_image_2.text_to_image(prompt)
|
|
|
|
|
47 |
|
48 |
return image_1, image_2 # 返回两个生成的图像
|
49 |
except Exception as e:
|
|
|
40 |
"""
|
41 |
try:
|
42 |
# 使用服务一 (默认模型)
|
43 |
+
print(f"Generating image from service 1 with prompt: {prompt}")
|
44 |
image_1 = client_image_1.text_to_image(prompt)
|
45 |
+
if image_1 is None:
|
46 |
+
print("Service 1 returned no image.")
|
47 |
|
48 |
# 使用服务二 (FLUX 模型)
|
49 |
+
print(f"Generating image from service 2 with prompt: {prompt}")
|
50 |
image_2 = client_image_2.text_to_image(prompt)
|
51 |
+
if image_2 is None:
|
52 |
+
print("Service 2 returned no image.")
|
53 |
|
54 |
return image_1, image_2 # 返回两个生成的图像
|
55 |
except Exception as e:
|