def video_geolocation_tab()

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


def video_geolocation_tab() -> None:
    """Show the video geolocation tab"""
    state = me.state(State)
    me.box(style=me.Style(height=24))

    me.text(
        "Even in short, detail-packed videos, Gemini 2.0 can identify the locations."
    )
    me.box(style=me.Style(height=12))

    me.video(
        key="geo",
        src=VIDEO_GEOLOCATION,
        style=me.Style(width=704),
    )
    me.box(style=me.Style(height=12))

    me.text("Our expectation: answers about the location of the video")
    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_video_tags,
        )
        me.button(
            "Generate ",
            color="primary",
            type="flat",
            on_click=generate_video_geolocation,
        )

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