XiangJinYu commited on
Commit
bee2619
·
verified ·
1 Parent(s): 97f2120

fix path bug

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -37,16 +37,16 @@ def get_template_path(template_name: str, is_new_template: bool = False) -> Path
37
  :param is_new_template: Whether it's a new template created by user
38
  :return: Path object for the template file
39
  """
40
-
41
  if is_new_template:
42
  # Create user-specific subdirectory in settings folder
43
  if "user_id" not in st.session_state:
44
  st.session_state.user_id = str(uuid.uuid4())
45
  user_settings_path = st.session_state.user_id
46
- return user_settings_path / f"{template_name}.yaml"
47
  else:
48
  # Use root settings path for existing templates
49
- return f"{template_name}.yaml"
50
 
51
  def get_all_templates() -> List[str]:
52
  """
 
37
  :param is_new_template: Whether it's a new template created by user
38
  :return: Path object for the template file
39
  """
40
+
41
  if is_new_template:
42
  # Create user-specific subdirectory in settings folder
43
  if "user_id" not in st.session_state:
44
  st.session_state.user_id = str(uuid.uuid4())
45
  user_settings_path = st.session_state.user_id
46
+ return Path(f"user_settings_path/{template_name}.yaml")
47
  else:
48
  # Use root settings path for existing templates
49
+ return Path("{template_name}.yaml")
50
 
51
  def get_all_templates() -> List[str]:
52
  """