acecalisto3 commited on
Commit
846d5f4
·
verified ·
1 Parent(s): f32e9bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -1585,15 +1585,16 @@ if __name__ == "__main__":
1585
  logger.error(f"Error running application: {e}")
1586
 
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:
 
1585
  logger.error(f"Error running application: {e}")
1586
 
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
+
1593
+ # Load custom templates
1594
+ for template_file in self.template_dir.glob("*.json"):
1595
+ try:
1596
+ with open(template_file, 'r', encoding='utf-8') as f:
1597
+ template_data = json.load(f)
1598
  name = template_file.stem
1599
  self.templates[name] = Template(**template_data)
1600
  except Exception as e: