def image_oven_tab()

in gemini/sample-apps/gemini-mesop-cloudrun/main.py [0:0]


def image_oven_tab() -> None:
    """Image oven tab"""
    state = me.state(State)
    me.box(style=me.Style(height=12))
    me.text("Oven Instructions", style=me.Style(font_weight="bold"))
    me.box(style=me.Style(height=12))

    me.text(
        "Equipped with the ability to extract information from visual elements on screens, Gemini 2.0 Pro can analyze screenshots, icons, and layouts to provide a holistic understanding of the depicted scene."
    )
    me.box(style=me.Style(height=12))

    with me.box(style=me.Style(display="grid", flex_direction="column", gap=2)):
        me.image(
            src="https://storage.googleapis.com/github-repo/img/gemini/multimodality_usecases_overview/stove.jpg",
            alt="image of an oven",
            style=me.Style(width="350px"),
        )
        with me.box(
            style=me.Style(align_content="center", flex_grow=1, display="flex")
        ):
            me.text(
                "Image of an oven",
                style=me.Style(color="rgba(49, 51, 63, 0.6)", font_size="14px"),
            )
    me.box(style=me.Style(height=12))

    me.text(
        "Our expectation: Provide instructions for resetting the clock on this appliance in English"
    )
    me.box(style=me.Style(height=12))

    with me.box(style=me.Style(display="flex", gap=10, padding=me.Padding(bottom=20))):
        me.button(
            "Clear",
            color="primary",
            type="stroked",
            on_click=on_click_clear_oven_instructions,
        )
        me.button(
            "Generate instructions",
            color="primary",
            type="flat",
            on_click=generate_oven_instructions,
        )

    with me.box(style=_BOX_STYLE):
        me.text("Instructions", style=me.Style(font_weight=500))
        if state.oven_instructions_output:
            with me.box(
                style=me.Style(
                    display="grid",
                    justify_content="center",
                    justify_items="center",
                )
            ):
                me.markdown(
                    key="oven_instrictions_output",
                    text=state.oven_instructions_output,
                    style=me.Style(width="100%", margin=me.Margin(top=10)),
                )