RozzaCreat commited on
Commit
c279bbd
·
verified ·
1 Parent(s): 9499b07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -86,12 +86,12 @@ def generate_passover_coloring_pages(age: int) -> str:
86
  font = ImageFont.load_default()
87
  small_font = ImageFont.load_default()
88
 
89
- # Add title to cover page
90
  draw.text((1240, 800), "Jewish Passover (Pesach)", fill='black', anchor='mm', font=font)
91
  draw.text((1240, 1000), "Coloring Pages", fill='black', anchor='mm', font=font)
92
  draw.text((1240, 1200), f"For Ages {age} Years", fill='black', anchor='mm', font=font)
93
- draw.text((1240, 1500), "Created for Jewish children and families", fill='black', anchor='mm', small_font)
94
- draw.text((1240, 1600), "to celebrate the story of Passover", fill='black', anchor='mm', small_font)
95
 
96
  # Save cover page with a sequential number for proper ordering
97
  cover_path = os.path.join(temp_dir, f"01_cover.png")
@@ -110,19 +110,19 @@ def generate_passover_coloring_pages(age: int) -> str:
110
  # Add a border
111
  draw.rectangle([(100, 100), (2380, 3408)], outline='black', width=4)
112
 
113
- # Add title at the top
114
  draw.text((1240, 200), description, fill='black', anchor='mm', font=font)
115
 
116
  # Add a content area for the coloring image
117
  draw.rectangle([(300, 400), (2180, 2800)], outline='black', width=2)
118
 
119
- # Add description text in the content area
120
- draw.text((1240, 1600), description, fill='black', anchor='mm', small_font)
121
- draw.text((1240, 1700), "Jewish Passover Coloring Page", fill='black', anchor='mm', small_font)
122
- draw.text((1240, 1800), f"For age: {age}", fill='black', anchor='mm', small_font)
123
 
124
- # Add footer
125
- draw.text((1240, 3300), f"Page {i+1} of {len(selected_pages)}", fill='black', anchor='mm', small_font)
126
 
127
  # Save with sequential numbering for proper PDF ordering
128
  seq_num = i + 2 # Start from 2 after the cover page
 
86
  font = ImageFont.load_default()
87
  small_font = ImageFont.load_default()
88
 
89
+ # Add title to cover page - FIXED ORDER OF ARGUMENTS
90
  draw.text((1240, 800), "Jewish Passover (Pesach)", fill='black', anchor='mm', font=font)
91
  draw.text((1240, 1000), "Coloring Pages", fill='black', anchor='mm', font=font)
92
  draw.text((1240, 1200), f"For Ages {age} Years", fill='black', anchor='mm', font=font)
93
+ draw.text((1240, 1500), "Created for Jewish children and families", fill='black', anchor='mm', font=small_font)
94
+ draw.text((1240, 1600), "to celebrate the story of Passover", fill='black', anchor='mm', font=small_font)
95
 
96
  # Save cover page with a sequential number for proper ordering
97
  cover_path = os.path.join(temp_dir, f"01_cover.png")
 
110
  # Add a border
111
  draw.rectangle([(100, 100), (2380, 3408)], outline='black', width=4)
112
 
113
+ # Add title at the top - FIXED ORDER OF ARGUMENTS
114
  draw.text((1240, 200), description, fill='black', anchor='mm', font=font)
115
 
116
  # Add a content area for the coloring image
117
  draw.rectangle([(300, 400), (2180, 2800)], outline='black', width=2)
118
 
119
+ # Add description text in the content area - FIXED ORDER OF ARGUMENTS
120
+ draw.text((1240, 1600), description, fill='black', anchor='mm', font=small_font)
121
+ draw.text((1240, 1700), "Jewish Passover Coloring Page", fill='black', anchor='mm', font=small_font)
122
+ draw.text((1240, 1800), f"For age: {age}", fill='black', anchor='mm', font=small_font)
123
 
124
+ # Add footer - FIXED ORDER OF ARGUMENTS
125
+ draw.text((1240, 3300), f"Page {i+1} of {len(selected_pages)}", fill='black', anchor='mm', font=small_font)
126
 
127
  # Save with sequential numbering for proper PDF ordering
128
  seq_num = i + 2 # Start from 2 after the cover page