bgamazay commited on
Commit
4b15c29
·
verified ·
1 Parent(s): f9dd218

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -207,10 +207,10 @@ def create_label_single_pass(background_image, model_data, final_size=(520, 728)
207
 
208
  # Capitalize only the first letter of the first word while keeping the rest as is
209
  def smart_capitalize(text):
210
- """Capitalizes the first letter of a string only if it's not already capitalized."""
211
- if not text:
212
- return text # Return unchanged if empty
213
- return text if text[0].isupper() else text[0].upper() + text[1:]
214
 
215
  # Apply smart capitalization
216
  provider_text = smart_capitalize(str(model_data['provider']))
 
207
 
208
  # Capitalize only the first letter of the first word while keeping the rest as is
209
  def smart_capitalize(text):
210
+ """Capitalizes the first letter of a string only if it's not already capitalized."""
211
+ if not text:
212
+ return text # Return unchanged if empty
213
+ return text if text[0].isupper() else text[0].upper() + text[1:]
214
 
215
  # Apply smart capitalization
216
  provider_text = smart_capitalize(str(model_data['provider']))