Update app.py
Browse files
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
|
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,
|