acecalisto3 commited on
Commit
2b5f51d
·
verified ·
1 Parent(s): ec86d09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -12
app.py CHANGED
@@ -1587,18 +1587,15 @@ if __name__ == "__main__":
1587
  def load_templates(self):
1588
  """Load all templates from directory"""
1589
  try:
1590
- # Load built-in templates
1591
- self.templates.update(self._get_builtin_templates())
1592
- # Load custom templates
1593
- for template_file in self.template_dir.glob("*.json"):
1594
- try:
1595
- with open(template_file, 'r', encoding='utf-8') as f:
1596
- template_data = json.load(f)
1597
- name = template_file.stem
1598
- self.templates[name] = Template(**template_data)
1599
- except Exception as e:
1600
- logger.error(f"Error loading template {template_file}: {e}")
1601
-
1602
  except Exception as e:
1603
  logger.error(f"Error loading templates: {e}")
1604
 
 
1587
  def load_templates(self):
1588
  """Load all templates from directory"""
1589
  try:
1590
+ # Load built-in templates
1591
+ self.templates.update(self._get_builtin_templates())
1592
+ # Load custom templates
1593
+ for template_file in self.template_dir.glob("*.json"):
1594
+ try:
1595
+ with open(template_file, 'r', encoding='utf-8') as f:
1596
+ template_data = json.load(f)
1597
+ name = template_file.stem
1598
+ self.templates[name] = Template(**template_data)
 
 
 
1599
  except Exception as e:
1600
  logger.error(f"Error loading templates: {e}")
1601