tomerk commited on
Commit
1172ef2
·
verified ·
1 Parent(s): e99e60c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -106,9 +106,10 @@ def check_condition(prompt, base64Frames):
106
  messages = [
107
  {"role": "system", "content": """You are analyzing video to check if the user's condition is met.
108
  Please respond with a JSON object in the following format:
109
- {"condition_met": true/false, "details": "optional details or summary. in the summary DON'T mention that you provided with images or frames but make it look like you was provided with video input!"}"""},
110
  {"role": "user", "content": [prompt, *map(lambda x: {"type": "image_url", "image_url": {"url": f'data:image/jpg;base64,{x}', "detail": "low"}}, base64Frames)]}
111
  ]
 
112
  response = client.chat.completions.create(
113
  model="gpt-4o",
114
  messages=messages,
 
106
  messages = [
107
  {"role": "system", "content": """You are analyzing video to check if the user's condition is met.
108
  Please respond with a JSON object in the following format:
109
+ {"condition_met": true/false, "details": "optional details or summary. in the summary DON'T mention the words: image, images, frame, or frames. Instead, make it look like you were provided with video input and avoid referring to individual images or frames explicitly."}"""},
110
  {"role": "user", "content": [prompt, *map(lambda x: {"type": "image_url", "image_url": {"url": f'data:image/jpg;base64,{x}', "detail": "low"}}, base64Frames)]}
111
  ]
112
+
113
  response = client.chat.completions.create(
114
  model="gpt-4o",
115
  messages=messages,