I was trying to run the https://github.com/google-gemini/cookbook/blob/main/examples/Sherlock_Jr.ipynb code in Google Colab, so I just clicked “Run in Google Colab” and setup the API key in the Google Colab secrets. Then I just started running each block of code, one by one, starting with the
!pip install -U -q google-generativeai
Everything went well with no errors until I reached the 5th block, this code:
video_file_name = "Sherlock_Jr_FullMovie.mp4"
print(f"Uploading file...")
video_file = genai.upload_file(path=video_file_name)
print(f"Completed upload: {video_file.uri}")
When I attempted to run it, this error happened: