File size: 554 Bytes
2c7dd03 bc4862e 2c7dd03 bc4862e 2c7dd03 bc4862e 9f1be35 2c7dd03 bc4862e 2c7dd03 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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()
|