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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -38,10 +38,11 @@ def analyze_image(image, instruction):
38
  # Call the Groq API to analyze the image
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,
 
38
  # Call the Groq API to analyze the image
39
  completion = client.chat.completions.create(
40
  model="llama-3.2-11b-vision-preview",
41
+ messages=[{
42
+ "role": "user",
43
  {"type": "text", "text": instruction}, # Text instruction
44
  {"type": "image_url", "image_url": {"url": image_url}}, # Image
45
+ }],
46
  temperature=1,
47
  max_tokens=512,
48
  top_p=1,