bgamazay commited on
Commit
0bb735b
·
verified ·
1 Parent(s): 9df2959

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -70,10 +70,11 @@ def create_label(background_image, model_data):
70
  # Choose a font and size. Change path/size as needed.
71
  # If you don't have a custom font file, you can use a PIL built-in font.
72
  try:
73
- font = ImageFont.truetype("Roboto-Regular.ttf", 200) # or "Arial.ttf", etc.
74
- except:
75
- # Fallback to a default PIL font if 'arial.ttf' is not found
76
  font = ImageFont.load_default()
 
77
 
78
  # You can customize the positions, colors, etc. For instance:
79
  # We'll just place the text in a simple stacked format at a fixed position.
 
70
  # Choose a font and size. Change path/size as needed.
71
  # If you don't have a custom font file, you can use a PIL built-in font.
72
  try:
73
+ font = ImageFont.truetype("Roboto-Regular.ttf", 200)
74
+ print("Font loaded successfully!")
75
+ except Exception as e:
76
  font = ImageFont.load_default()
77
+ print(f"Font loading failed: {e}")
78
 
79
  # You can customize the positions, colors, etc. For instance:
80
  # We'll just place the text in a simple stacked format at a fixed position.