File size: 385 Bytes
9af61ac
 
e922dc7
9af61ac
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr
from pathlib import Path

def load_readme() -> str:
    readme_path = Path(__file__).parent / "README.md"
    if readme_path.exists():
        return readme_path.read_text()
    return "# README.md not found\nPlease add a README.md file to the root directory."

with gr.Blocks() as demo:
    gr.Markdown(load_readme())

if __name__ == "__main__":
    demo.launch()