You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it says that we can create video summarization with vertexai, but i wonder if we can do the same thing with pydanticai versio of vertexai? if so, how? it says in the documentation that we can do it like this
importvertexaifromvertexai.generative_modelsimportGenerativeModel, Part# TODO(developer): Update and un-comment below line# PROJECT_ID = "your-project-id"vertexai.init(project=PROJECT_ID, location="us-central1")
model=GenerativeModel("gemini-1.5-flash-002")
prompt="""Provide a description of the video.The description should also contain anything important which people say in the video."""video_file=Part.from_uri(
uri="gs://cloud-samples-data/generative-ai/video/pixel8.mp4",
mime_type="video/mp4",
)
contents= [video_file, prompt]
response=model.generate_content(contents)
print(response.text)
# Example response:# Here is a description of the video.# ... Then, the scene changes to a woman named Saeko Shimada..# She says, "Tokyo has many faces. The city at night is totally different# from what you see during the day."# ...
The text was updated successfully, but these errors were encountered:
i once stumbled on this stuff inside google vertexai docs
https://cloud.google.com/vertex-ai/generative-ai/docs/samples/generativeaionvertexai-gemini-video-with-audio#generativeaionvertexai_gemini_video_with_audio-python
it says that we can create video summarization with vertexai, but i wonder if we can do the same thing with pydanticai versio of vertexai? if so, how? it says in the documentation that we can do it like this
The text was updated successfully, but these errors were encountered: