Spaces:
Build error
Build error
tlemagueresse commited on
Commit ·
d0df5e4
1
Parent(s): d856028
drop the header
Browse files123456789101112131415import gradio as gr# Load README contentwith open("README.md", "r", encoding="utf-8") as f:readme_content = f.read()# Gradio interface to display READMEdef show_readme():return readme_contentapp = gr.Blocks()with app:gr.Markdown(readme_content)app.launch()12345678910111213141516171819202122import reimport gradio as grdef remove_yaml_header(text):"""Remove YAML header (front matter) from markdown text."""pattern = r'^---\n[\s\S]*?\n---\n'cleaned_text = re.sub(pattern, '', text)return cleaned_textwith open("README.md", "r", encoding="utf-8") as f:readme_content = f.read()cleaned_readme = remove_yaml_header(readme_content)app = gr.Blocks()with app:gr.Markdown(cleaned_readme)app.launch()
app.py+12-5