XiangJinYu commited on
Commit
621008a
·
verified ·
1 Parent(s): bee2619

fix path bug

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -30,7 +30,7 @@ def cleanup_workspace(workspace_dir: Path) -> None:
30
  except Exception as e:
31
  _logger.error(f"Error cleaning up workspace: {e}")
32
 
33
- def get_template_path(template_name: str, is_new_template: bool = False) -> Path:
34
  """
35
  Get template file path
36
  :param template_name: Name of the template
@@ -43,10 +43,10 @@ def get_template_path(template_name: str, is_new_template: bool = False) -> Path
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
  """
 
30
  except Exception as e:
31
  _logger.error(f"Error cleaning up workspace: {e}")
32
 
33
+ def get_template_path(template_name: str, is_new_template: bool = False) -> str:
34
  """
35
  Get template file path
36
  :param template_name: Name of the template
 
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 f"{user_settings_path}/{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
  """