Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -75,7 +75,12 @@ def generate_image(prompt: str, status: list) -> Image.Image:
|
|
| 75 |
for model in models:
|
| 76 |
status.append(f"⏳ Trying {model.split('/')[1]}...")
|
| 77 |
try:
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
status.append(f"✅ Image generated!")
|
| 80 |
return img.convert("RGB")
|
| 81 |
except Exception as e:
|
|
|
|
| 75 |
for model in models:
|
| 76 |
status.append(f"⏳ Trying {model.split('/')[1]}...")
|
| 77 |
try:
|
| 78 |
+
NEGATIVE = "text, words, letters, numbers, typography, watermark, signature, label, caption, title, heading, font, alphabet, characters, writing, blurry, ugly, distorted, low quality"
|
| 79 |
+
img = client.text_to_image(
|
| 80 |
+
prompt,
|
| 81 |
+
model=model,
|
| 82 |
+
negative_prompt=NEGATIVE,
|
| 83 |
+
)
|
| 84 |
status.append(f"✅ Image generated!")
|
| 85 |
return img.convert("RGB")
|
| 86 |
except Exception as e:
|