Afeezee commited on
Commit
2a6cbdc
·
verified ·
1 Parent(s): 9bd4a41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -39,11 +39,11 @@ def analyze_image(image, instruction):
39
  completion = client.chat.completions.create(
40
  model="llama-3.2-11b-vision-preview",
41
  messages=[
42
- {"role": "user", "content": instruction}, # Text instruction
43
- {"role": "user", "content": [{"type": "image_url", "image_url": {"url": image_url}}]}, # Image
44
  ],
45
  temperature=1,
46
- max_tokens=1024,
47
  top_p=1,
48
  stream=False,
49
  stop=None,
 
39
  completion = client.chat.completions.create(
40
  model="llama-3.2-11b-vision-preview",
41
  messages=[
42
+ {"type": "text", "text": instruction}, # Text instruction
43
+ {"type": "image_url", "image_url": {"url": image_url}}, # Image
44
  ],
45
  temperature=1,
46
+ max_tokens=512,
47
  top_p=1,
48
  stream=False,
49
  stop=None,