| import gradio as gr | |
| import re | |
| with open("README.md", encoding="utf-8") as f: | |
| md = f.read() | |
| md = re.sub(r"^---.*?---\s*", "", md, flags=re.S) | |
| CSS = """ | |
| :root { | |
| font-size: 20px !important; | |
| } | |
| .gradio-container { | |
| font-size: 20px !important; | |
| } | |
| .gradio-container .markdown, | |
| .gradio-container .markdown p, | |
| .gradio-container .markdown li { | |
| font-size: 20px !important; | |
| line-height: 1.9 !important; | |
| } | |
| .gradio-container .markdown h1 { | |
| font-size: 2.4rem !important; | |
| } | |
| .gradio-container .markdown h2 { | |
| font-size: 1.8rem !important; | |
| } | |
| .gradio-container .markdown h3 { | |
| font-size: 1.4rem !important; | |
| } | |
| .gradio-container { | |
| max-width: 900px; | |
| margin: auto; | |
| } | |
| """ | |
| with gr.Blocks(css=CSS) as demo: | |
| gr.Image("image1.png", show_label=False) | |
| gr.Markdown(md) | |
| gr.Image("image2.png", show_label=False) | |
| demo.launch() |