@heylemon/lemonade 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/docs/MaxModeSystemPrompt.md +50 -0
- package/package.json +1 -1
- package/skills/image-generation/SKILL.md +78 -26
- package/skills/image-generation/scripts/generate_image.py +201 -0
- /package/skills/nano-banana-pro/{SKILL.md → SKILL.md.disabled} +0 -0
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
70db137c6b173ef309e5480906d0de1f7b00a40b9b22c0897b83333f4a999c3c
|
|
@@ -218,6 +218,16 @@ The 4th argument is the file path. Never send a text-only email when the user as
|
|
|
218
218
|
| Notion | `lemon-notion` |
|
|
219
219
|
| YouTube | `lemon-youtube` |
|
|
220
220
|
|
|
221
|
+
## WhatsApp: finding groups and contacts
|
|
222
|
+
|
|
223
|
+
When sending a WhatsApp message to a person or group:
|
|
224
|
+
- **Find group JIDs:** Run `wacli chats list --limit 20 --query "group name"`. Group JIDs end with `@g.us`.
|
|
225
|
+
- **Send to a group:** Use `message` tool: `{ action: "send", channel: "whatsapp", target: "GROUP_JID@g.us", message: "..." }`
|
|
226
|
+
- **Send to a person:** Use `message` tool with E.164 format: `{ action: "send", channel: "whatsapp", target: "+15551234567", message: "..." }`
|
|
227
|
+
- **NEVER guess or fabricate group JIDs.** Always look them up first with `wacli chats list`.
|
|
228
|
+
- If the user refers to a group by name (e.g. "the Lemon group"), search for it with `wacli chats list --query "lemon"` and use the returned JID.
|
|
229
|
+
- If `wacli` is not available, try `message { action: "search-channels", channel: "whatsapp", query: "group name" }`.
|
|
230
|
+
|
|
221
231
|
**When to use browser automation:**
|
|
222
232
|
- If the CLI tool binary is missing, not installed, or the service is genuinely not connected (e.g. "command not found", "not authenticated", connection refused).
|
|
223
233
|
- If `lemon://connect` fails or OAuth is unavailable for a service (e.g. Jira, Trello, Asana). Use the browser to complete the task directly.
|
|
@@ -408,6 +418,36 @@ Say "yes" to proceed.
|
|
|
408
418
|
|
|
409
419
|
---
|
|
410
420
|
|
|
421
|
+
# DATA INTEGRITY - NEVER FABRICATE
|
|
422
|
+
|
|
423
|
+
**You must never make up data.** Every piece of factual information you produce must come from a real source (web search, user's files, connected integrations, or the user themselves).
|
|
424
|
+
|
|
425
|
+
**NEVER fabricate:**
|
|
426
|
+
- Contact details: names, emails, phone numbers, job titles, LinkedIn URLs
|
|
427
|
+
- Company data: revenue, employee count, funding, founding year, headquarters
|
|
428
|
+
- Lead lists, prospect lists, or contact databases
|
|
429
|
+
- Statistics, metrics, survey results, or market data
|
|
430
|
+
- Financial figures: stock prices, valuations, deal sizes
|
|
431
|
+
- Dates, deadlines, or event details you haven't verified
|
|
432
|
+
- Addresses, locations, or geographic data
|
|
433
|
+
|
|
434
|
+
**When collecting or compiling data (lead gen, research, scraping, reports):**
|
|
435
|
+
- Use web_search and web_fetch to find real, verifiable information
|
|
436
|
+
- Only include data points you actually found from a source
|
|
437
|
+
- If a field can't be found (e.g., a person's email or a company's revenue), leave it blank or mark it as "Not found" — never fill it with a plausible guess
|
|
438
|
+
- Never pad a list with made-up entries to make it look more complete
|
|
439
|
+
- If the user asks for 50 leads and you can only find 12 real ones, give 12 and explain
|
|
440
|
+
|
|
441
|
+
**When creating spreadsheets, documents, or reports with data:**
|
|
442
|
+
- Every data point must be sourced from real research, the user's files, or connected apps
|
|
443
|
+
- Clearly label any estimates or approximations as such
|
|
444
|
+
- Do not generate sample/placeholder data unless the user explicitly asks for dummy or test data
|
|
445
|
+
- If asked to "fill in" a template with real data, only fill fields you can verify
|
|
446
|
+
|
|
447
|
+
**If you can't find the data:** Say so. "I could only find verified info for 8 of the 20 companies" is always better than silently making up the other 12.
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
411
451
|
# REMINDERS vs SCHEDULED TASKS - KNOW THE DIFFERENCE
|
|
412
452
|
|
|
413
453
|
## Use macOS Reminders App for SIMPLE TIME-BASED REMINDERS:
|
|
@@ -483,6 +523,16 @@ lemon-cron add "Hourly Reminder" "0 * * * *" "lemon-cron notify 'Another hour ha
|
|
|
483
523
|
- Notify only → Reminders app
|
|
484
524
|
- Do something → lemon-cron
|
|
485
525
|
|
|
526
|
+
## Missed Tasks
|
|
527
|
+
|
|
528
|
+
If the user says "run my missed tasks", "what tasks did I miss", "any missed cron jobs", or similar:
|
|
529
|
+
1. Run `lemon-cron list` to see all jobs and their last status
|
|
530
|
+
2. Look for jobs with `lastStatus: "missed"` or `lastStatus: "error"`
|
|
531
|
+
3. For each missed/failed job, offer to re-run it with `lemon-cron run <jobId>`
|
|
532
|
+
4. If there are no missed tasks, say "No missed tasks."
|
|
533
|
+
|
|
534
|
+
Cron jobs can miss their schedule when the laptop is asleep or Lemonade isn't running. When the user wakes their laptop, they may get notifications about missed tasks with a "Run Now" button. If they ask you to run them instead, use the `cron` tool to force-run the missed jobs.
|
|
535
|
+
|
|
486
536
|
---
|
|
487
537
|
|
|
488
538
|
# BROWSER RULES (READ BEFORE USING ANY BROWSER TOOL)
|
package/package.json
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: image-generation
|
|
3
|
-
description: Generate images using DALL-E 3 or
|
|
3
|
+
description: Generate images using DALL-E 3 or Nano Banana Pro (Gemini 3 Pro Image). Create artwork, illustrations, photos, designs, edit images. Triggers on: generate image, create picture, make art, draw, illustration, design image, edit image
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Image Generation Skill
|
|
7
7
|
|
|
8
|
-
Generate images using OpenAI
|
|
8
|
+
Generate images using either **DALL-E 3** (OpenAI) or **Nano Banana Pro** (Gemini 3 Pro Image), routed through the Lemonade backend proxy.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Model Selection
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Check the `IMAGE_GEN_MODEL` environment variable to decide which model to use:
|
|
13
|
+
|
|
14
|
+
- `dall-e-3` → Use DALL-E 3 (OpenAI) — text-to-image only
|
|
15
|
+
- `nano-banana-pro` → Use Nano Banana Pro (Gemini 3 Pro Image) — text-to-image, editing, multi-image composition
|
|
16
|
+
|
|
17
|
+
If `IMAGE_GEN_MODEL` is not set, default to `dall-e-3`.
|
|
18
|
+
|
|
19
|
+
**To check:** run `echo $IMAGE_GEN_MODEL` with the `exec` tool before generating.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## DALL-E 3 (OpenAI)
|
|
24
|
+
|
|
25
|
+
Use the `exec` tool to run an inline Python script. Routes through the Lemonade backend proxy — no local API key needed.
|
|
13
26
|
|
|
14
27
|
```python
|
|
15
28
|
import openai
|
|
@@ -43,6 +56,55 @@ urllib.request.urlretrieve(image_url, filepath)
|
|
|
43
56
|
print(f"Image saved to Desktop: {filename}")
|
|
44
57
|
```
|
|
45
58
|
|
|
59
|
+
### DALL-E 3 Size Options
|
|
60
|
+
|
|
61
|
+
| Size | Aspect Ratio | Best For |
|
|
62
|
+
|------|--------------|----------|
|
|
63
|
+
| 1024x1024 | Square | Profile pictures, icons |
|
|
64
|
+
| 1792x1024 | Landscape | Desktop wallpapers, banners |
|
|
65
|
+
| 1024x1792 | Portrait | Phone wallpapers, posters |
|
|
66
|
+
|
|
67
|
+
### DALL-E 3 Quality Options
|
|
68
|
+
|
|
69
|
+
| Quality | Description |
|
|
70
|
+
|---------|-------------|
|
|
71
|
+
| standard | Good for most uses |
|
|
72
|
+
| hd | More detailed, sharper |
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Nano Banana Pro (Gemini 3 Pro Image)
|
|
77
|
+
|
|
78
|
+
Use the bundled script via `exec`. Routes through the Lemonade backend proxy when `LEMON_BACKEND_URL` and `GATEWAY_TOKEN` are set, otherwise falls back to `GEMINI_API_KEY`.
|
|
79
|
+
|
|
80
|
+
### Generate
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
uv run {baseDir}/scripts/generate_image.py --prompt "your image description" --filename ~/Desktop/output.png --resolution 1K
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Edit (single image)
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
uv run {baseDir}/scripts/generate_image.py --prompt "edit instructions" --filename ~/Desktop/output.png -i "/path/to/input.png" --resolution 2K
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Multi-image composition (up to 14 images)
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
uv run {baseDir}/scripts/generate_image.py --prompt "combine these into one scene" --filename ~/Desktop/output.png -i img1.png -i img2.png -i img3.png
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Nano Banana Pro Resolutions
|
|
99
|
+
|
|
100
|
+
| Resolution | Best For |
|
|
101
|
+
|------------|----------|
|
|
102
|
+
| 1K (default) | Quick previews, social media |
|
|
103
|
+
| 2K | Prints, detailed work |
|
|
104
|
+
| 4K | High-resolution output |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
46
108
|
## Prompt Best Practices
|
|
47
109
|
|
|
48
110
|
### Be Specific
|
|
@@ -58,31 +120,21 @@ print(f"Image saved to Desktop: {filename}")
|
|
|
58
120
|
- Mood: "serene", "energetic", "mysterious"
|
|
59
121
|
- Colors: "vibrant colors", "muted tones", "black and white"
|
|
60
122
|
|
|
61
|
-
## Size Options
|
|
62
|
-
|
|
63
|
-
| Size | Aspect Ratio | Best For |
|
|
64
|
-
|------|--------------|----------|
|
|
65
|
-
| 1024x1024 | Square | Profile pictures, icons |
|
|
66
|
-
| 1792x1024 | Landscape | Desktop wallpapers, banners |
|
|
67
|
-
| 1024x1792 | Portrait | Phone wallpapers, posters |
|
|
68
|
-
|
|
69
|
-
## Quality Options
|
|
70
|
-
|
|
71
|
-
| Quality | Description |
|
|
72
|
-
|---------|-------------|
|
|
73
|
-
| standard | Good for most uses |
|
|
74
|
-
| hd | More detailed, sharper |
|
|
75
|
-
|
|
76
123
|
## Workflow
|
|
77
124
|
|
|
78
|
-
1. **
|
|
79
|
-
2. **
|
|
80
|
-
3. **
|
|
81
|
-
4. **
|
|
82
|
-
5. **
|
|
125
|
+
1. **Check model** — run `echo $IMAGE_GEN_MODEL` to determine which backend to use
|
|
126
|
+
2. **Understand request** — What does the user want to create or edit?
|
|
127
|
+
3. **Choose model** — If editing or compositing, prefer Nano Banana Pro (if activated). For text-to-image, use whichever is set.
|
|
128
|
+
4. **Craft detailed prompt** — Add style, lighting, composition details
|
|
129
|
+
5. **Generate image** — Run the appropriate script
|
|
130
|
+
6. **Save to Desktop** — Use `~/Desktop/` with timestamped filename
|
|
131
|
+
7. **Confirm** — Tell user where the image was saved
|
|
83
132
|
|
|
84
133
|
## Important Notes
|
|
85
134
|
|
|
86
135
|
- Always save generated images to `~/Desktop/` for easy access
|
|
87
|
-
-
|
|
88
|
-
-
|
|
136
|
+
- DALL-E image URLs expire after ~1 hour, so always save locally
|
|
137
|
+
- For DALL-E, install openai if needed: `source ~/.lemonade/.venv/bin/activate && pip install -q openai`
|
|
138
|
+
- Nano Banana Pro requires `uv` — install via `brew install uv` if missing
|
|
139
|
+
- Use timestamps in filenames: `yyyy-mm-dd-hh-mm-ss-name.png`
|
|
140
|
+
- The Nano Banana Pro script prints a `MEDIA:` line for Lemonade to auto-attach on supported providers
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# /// script
|
|
3
|
+
# requires-python = ">=3.10"
|
|
4
|
+
# dependencies = [
|
|
5
|
+
# "google-genai>=1.0.0",
|
|
6
|
+
# "pillow>=10.0.0",
|
|
7
|
+
# ]
|
|
8
|
+
# ///
|
|
9
|
+
"""
|
|
10
|
+
Generate images using Google's Nano Banana Pro (Gemini 3 Pro Image) API.
|
|
11
|
+
|
|
12
|
+
Usage:
|
|
13
|
+
uv run generate_image.py --prompt "your image description" --filename "output.png" [--resolution 1K|2K|4K] [--api-key KEY]
|
|
14
|
+
|
|
15
|
+
Multi-image editing (up to 14 images):
|
|
16
|
+
uv run generate_image.py --prompt "combine these images" --filename "output.png" -i img1.png -i img2.png -i img3.png
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import argparse
|
|
20
|
+
import os
|
|
21
|
+
import sys
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def get_api_key(provided_key: str | None) -> str | None:
|
|
26
|
+
"""Get API key from argument first, then environment."""
|
|
27
|
+
if provided_key:
|
|
28
|
+
return provided_key
|
|
29
|
+
return os.environ.get("GEMINI_API_KEY")
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def get_proxy_config() -> tuple[str | None, str | None]:
|
|
33
|
+
"""Get backend proxy URL and gateway token for server-side API key routing."""
|
|
34
|
+
backend_url = os.environ.get("LEMON_BACKEND_URL", "").rstrip("/")
|
|
35
|
+
gateway_token = os.environ.get("GATEWAY_TOKEN", "")
|
|
36
|
+
if backend_url and gateway_token:
|
|
37
|
+
return f"{backend_url}/api/lemonade/proxy/gemini", gateway_token
|
|
38
|
+
return None, None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def main():
|
|
42
|
+
parser = argparse.ArgumentParser(
|
|
43
|
+
description="Generate images using Nano Banana Pro (Gemini 3 Pro Image)"
|
|
44
|
+
)
|
|
45
|
+
parser.add_argument(
|
|
46
|
+
"--prompt", "-p",
|
|
47
|
+
required=True,
|
|
48
|
+
help="Image description/prompt"
|
|
49
|
+
)
|
|
50
|
+
parser.add_argument(
|
|
51
|
+
"--filename", "-f",
|
|
52
|
+
required=True,
|
|
53
|
+
help="Output filename (e.g., sunset-mountains.png)"
|
|
54
|
+
)
|
|
55
|
+
parser.add_argument(
|
|
56
|
+
"--input-image", "-i",
|
|
57
|
+
action="append",
|
|
58
|
+
dest="input_images",
|
|
59
|
+
metavar="IMAGE",
|
|
60
|
+
help="Input image path(s) for editing/composition. Can be specified multiple times (up to 14 images)."
|
|
61
|
+
)
|
|
62
|
+
parser.add_argument(
|
|
63
|
+
"--resolution", "-r",
|
|
64
|
+
choices=["1K", "2K", "4K"],
|
|
65
|
+
default="1K",
|
|
66
|
+
help="Output resolution: 1K (default), 2K, or 4K"
|
|
67
|
+
)
|
|
68
|
+
parser.add_argument(
|
|
69
|
+
"--api-key", "-k",
|
|
70
|
+
help="Gemini API key (overrides GEMINI_API_KEY env var)"
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
args = parser.parse_args()
|
|
74
|
+
|
|
75
|
+
# Prefer backend proxy (API key stays server-side), fall back to local key
|
|
76
|
+
proxy_url, gateway_token = get_proxy_config()
|
|
77
|
+
api_key = get_api_key(args.api_key)
|
|
78
|
+
|
|
79
|
+
if not proxy_url and not api_key:
|
|
80
|
+
print("Error: No API key or backend proxy available.", file=sys.stderr)
|
|
81
|
+
print("Please either:", file=sys.stderr)
|
|
82
|
+
print(" 1. Set LEMON_BACKEND_URL + GATEWAY_TOKEN (backend proxy)", file=sys.stderr)
|
|
83
|
+
print(" 2. Provide --api-key argument", file=sys.stderr)
|
|
84
|
+
print(" 3. Set GEMINI_API_KEY environment variable", file=sys.stderr)
|
|
85
|
+
sys.exit(1)
|
|
86
|
+
|
|
87
|
+
from google import genai
|
|
88
|
+
from google.genai import types
|
|
89
|
+
from PIL import Image as PILImage
|
|
90
|
+
|
|
91
|
+
if proxy_url:
|
|
92
|
+
print(f"Using backend proxy for Gemini API")
|
|
93
|
+
client = genai.Client(
|
|
94
|
+
api_key=gateway_token,
|
|
95
|
+
http_options=types.HttpOptions(api_endpoint=proxy_url),
|
|
96
|
+
)
|
|
97
|
+
else:
|
|
98
|
+
client = genai.Client(api_key=api_key)
|
|
99
|
+
|
|
100
|
+
# Set up output path
|
|
101
|
+
output_path = Path(args.filename)
|
|
102
|
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
103
|
+
|
|
104
|
+
# Load input images if provided (up to 14 supported by Nano Banana Pro)
|
|
105
|
+
input_images = []
|
|
106
|
+
output_resolution = args.resolution
|
|
107
|
+
if args.input_images:
|
|
108
|
+
if len(args.input_images) > 14:
|
|
109
|
+
print(f"Error: Too many input images ({len(args.input_images)}). Maximum is 14.", file=sys.stderr)
|
|
110
|
+
sys.exit(1)
|
|
111
|
+
|
|
112
|
+
max_input_dim = 0
|
|
113
|
+
for img_path in args.input_images:
|
|
114
|
+
try:
|
|
115
|
+
img = PILImage.open(img_path)
|
|
116
|
+
input_images.append(img)
|
|
117
|
+
print(f"Loaded input image: {img_path}")
|
|
118
|
+
|
|
119
|
+
# Track largest dimension for auto-resolution
|
|
120
|
+
width, height = img.size
|
|
121
|
+
max_input_dim = max(max_input_dim, width, height)
|
|
122
|
+
except Exception as e:
|
|
123
|
+
print(f"Error loading input image '{img_path}': {e}", file=sys.stderr)
|
|
124
|
+
sys.exit(1)
|
|
125
|
+
|
|
126
|
+
# Auto-detect resolution from largest input if not explicitly set
|
|
127
|
+
if args.resolution == "1K" and max_input_dim > 0: # Default value
|
|
128
|
+
if max_input_dim >= 3000:
|
|
129
|
+
output_resolution = "4K"
|
|
130
|
+
elif max_input_dim >= 1500:
|
|
131
|
+
output_resolution = "2K"
|
|
132
|
+
else:
|
|
133
|
+
output_resolution = "1K"
|
|
134
|
+
print(f"Auto-detected resolution: {output_resolution} (from max input dimension {max_input_dim})")
|
|
135
|
+
|
|
136
|
+
# Build contents (images first if editing, prompt only if generating)
|
|
137
|
+
if input_images:
|
|
138
|
+
contents = [*input_images, args.prompt]
|
|
139
|
+
img_count = len(input_images)
|
|
140
|
+
print(f"Processing {img_count} image{'s' if img_count > 1 else ''} with resolution {output_resolution}...")
|
|
141
|
+
else:
|
|
142
|
+
contents = args.prompt
|
|
143
|
+
print(f"Generating image with resolution {output_resolution}...")
|
|
144
|
+
|
|
145
|
+
try:
|
|
146
|
+
response = client.models.generate_content(
|
|
147
|
+
model="gemini-3-pro-image-preview",
|
|
148
|
+
contents=contents,
|
|
149
|
+
config=types.GenerateContentConfig(
|
|
150
|
+
response_modalities=["TEXT", "IMAGE"],
|
|
151
|
+
image_config=types.ImageConfig(
|
|
152
|
+
image_size=output_resolution
|
|
153
|
+
)
|
|
154
|
+
)
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
# Process response and convert to PNG
|
|
158
|
+
image_saved = False
|
|
159
|
+
for part in response.parts:
|
|
160
|
+
if part.text is not None:
|
|
161
|
+
print(f"Model response: {part.text}")
|
|
162
|
+
elif part.inline_data is not None:
|
|
163
|
+
# Convert inline data to PIL Image and save as PNG
|
|
164
|
+
from io import BytesIO
|
|
165
|
+
|
|
166
|
+
# inline_data.data is already bytes, not base64
|
|
167
|
+
image_data = part.inline_data.data
|
|
168
|
+
if isinstance(image_data, str):
|
|
169
|
+
# If it's a string, it might be base64
|
|
170
|
+
import base64
|
|
171
|
+
image_data = base64.b64decode(image_data)
|
|
172
|
+
|
|
173
|
+
image = PILImage.open(BytesIO(image_data))
|
|
174
|
+
|
|
175
|
+
# Ensure RGB mode for PNG (convert RGBA to RGB with white background if needed)
|
|
176
|
+
if image.mode == 'RGBA':
|
|
177
|
+
rgb_image = PILImage.new('RGB', image.size, (255, 255, 255))
|
|
178
|
+
rgb_image.paste(image, mask=image.split()[3])
|
|
179
|
+
rgb_image.save(str(output_path), 'PNG')
|
|
180
|
+
elif image.mode == 'RGB':
|
|
181
|
+
image.save(str(output_path), 'PNG')
|
|
182
|
+
else:
|
|
183
|
+
image.convert('RGB').save(str(output_path), 'PNG')
|
|
184
|
+
image_saved = True
|
|
185
|
+
|
|
186
|
+
if image_saved:
|
|
187
|
+
full_path = output_path.resolve()
|
|
188
|
+
print(f"\nImage saved: {full_path}")
|
|
189
|
+
# Lemonade parses MEDIA tokens and will attach the file on supported providers.
|
|
190
|
+
print(f"MEDIA: {full_path}")
|
|
191
|
+
else:
|
|
192
|
+
print("Error: No image was generated in the response.", file=sys.stderr)
|
|
193
|
+
sys.exit(1)
|
|
194
|
+
|
|
195
|
+
except Exception as e:
|
|
196
|
+
print(f"Error generating image: {e}", file=sys.stderr)
|
|
197
|
+
sys.exit(1)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
if __name__ == "__main__":
|
|
201
|
+
main()
|
|
File without changes
|