Benjamin Consolvo commited on
Commit
dd706e6
·
1 Parent(s): 0b7487f

modify readme showing

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -41,6 +41,13 @@ def read_readme():
41
  if readme_path.exists():
42
  with open(readme_path, 'r') as f:
43
  readme_content = f.read()
 
 
 
 
 
 
 
44
  return readme_content
45
  else:
46
  return "README.md file not found in the project directory."
 
41
  if readme_path.exists():
42
  with open(readme_path, 'r') as f:
43
  readme_content = f.read()
44
+
45
+ # Remove metadata block (everything between the first pair of "---")
46
+ if readme_content.startswith("---"):
47
+ metadata_end = readme_content.find("---", 3) # Find the closing "---"
48
+ if metadata_end != -1:
49
+ readme_content = readme_content[metadata_end + 3:].strip()
50
+
51
  return readme_content
52
  else:
53
  return "README.md file not found in the project directory."