from __future__ import annotations from pathlib import Path import gradio as gr def read_space_card() -> str: """Render the Space card as the app body, excluding YAML metadata.""" readme = Path(__file__).with_name("README.md").read_text(encoding="utf-8") if readme.startswith("---"): _, _, body = readme.partition("---\n") _, _, readme = body.partition("---\n") return readme.strip() with gr.Blocks(title="Resep ID Gemma 4") as demo: gr.Markdown(read_space_card()) if __name__ == "__main__": demo.launch()