in gemini/sample-apps/gemini-mesop-cloudrun/main.py [0:0]
def video_highlights_tab() -> None:
"""Show the video highlights tab"""
state = me.state(State)
me.box(style=me.Style(height=24))
me.text(
"Another example of using Gemini 2.0 is to ask questions about objects, people or the context, as shown in the video about Pixel 8 below:"
)
me.box(style=me.Style(height=12))
me.video(
key="highlights",
src=VIDEO_HIGHLIGHTS,
style=me.Style(width=704),
)
me.box(style=me.Style(height=12))
me.text("Our expectation: Generate the highlights for 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 highlights",
color="primary",
type="flat",
on_click=generate_video_highlights,
)
with me.box(style=_BOX_STYLE):
me.text("Highlights", style=me.Style(font_weight=500))
if state.video_highlights_content:
with me.box(
style=me.Style(
display="grid",
justify_content="center",
justify_items="center",
)
):
me.markdown(
key="video_highlights_content",
text=state.video_highlights_content,
style=me.Style(width="100%", margin=me.Margin(top=10)),
)