codelion commited on
Commit
5e2d98d
·
verified ·
1 Parent(s): cba459f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -22,6 +22,7 @@ def call_gemini(video_file: str, prompt: str, config: GenerateContentConfig = No
22
  """
23
  Call the Gemini model with the provided video file and prompt.
24
  The video file is read as bytes and passed with MIME type "video/mp4".
 
25
  Optionally accepts a config (e.g. response_schema) for structured output.
26
  """
27
  with open(video_file, "rb") as f:
@@ -30,7 +31,7 @@ def call_gemini(video_file: str, prompt: str, config: GenerateContentConfig = No
30
  model=MODEL_NAME,
31
  contents=[
32
  Part(file_data=file_bytes, mime_type="video/mp4"),
33
- Part(text=prompt)
34
  ],
35
  config=config
36
  )
 
22
  """
23
  Call the Gemini model with the provided video file and prompt.
24
  The video file is read as bytes and passed with MIME type "video/mp4".
25
+ The prompt is passed as a plain string.
26
  Optionally accepts a config (e.g. response_schema) for structured output.
27
  """
28
  with open(video_file, "rb") as f:
 
31
  model=MODEL_NAME,
32
  contents=[
33
  Part(file_data=file_bytes, mime_type="video/mp4"),
34
+ prompt, # Pass prompt as a plain string
35
  ],
36
  config=config
37
  )