bgamazay commited on
Commit
4ee5de3
·
verified ·
1 Parent(s): 3b02624

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -90,9 +90,9 @@ def create_label_single_pass(background_image, model_data, final_size=(520, 728)
90
  # 3. Place your text.
91
  # You may need to experiment with x/y coordinates or font sizes
92
  # to make it look right in 520×728.
93
- title_x, title_y = 32, 140
94
- details_x, details_y = 480, 260
95
- energy_x, energy_y = 460, 470
96
 
97
  # Text 1 (title)
98
  draw.text((title_x, title_y), str(model_data['model']), font=title_font, fill="black")
@@ -108,7 +108,7 @@ def create_label_single_pass(background_image, model_data, final_size=(520, 728)
108
  bbox = draw.textbbox((0, 0), line, font=details_font)
109
  text_width = bbox[2] - bbox[0]
110
  # Right-justify the details text at details_x
111
- draw.text((details_x - text_width, details_y + i*50), line, font=details_font, fill="black")
112
 
113
  # Text 3 (energy)
114
  energy_text = str(model_data['energy'])
 
90
  # 3. Place your text.
91
  # You may need to experiment with x/y coordinates or font sizes
92
  # to make it look right in 520×728.
93
+ title_x, title_y = 32, 145
94
+ details_x, details_y = 480, 256
95
+ energy_x, energy_y = 460, 472
96
 
97
  # Text 1 (title)
98
  draw.text((title_x, title_y), str(model_data['model']), font=title_font, fill="black")
 
108
  bbox = draw.textbbox((0, 0), line, font=details_font)
109
  text_width = bbox[2] - bbox[0]
110
  # Right-justify the details text at details_x
111
+ draw.text((details_x - text_width, details_y + i*45), line, font=details_font, fill="black")
112
 
113
  # Text 3 (energy)
114
  energy_text = str(model_data['energy'])