Afeezee commited on
Commit
36c5498
·
verified ·
1 Parent(s): a3b79ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -35,15 +35,18 @@ def analyze_image(image, instruction):
35
  # Debug: Log the uploaded image URL
36
  print(f"Uploaded Image URL: {image_url}")
37
 
 
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,
49
  stream=False,
 
35
  # Debug: Log the uploaded image URL
36
  print(f"Uploaded Image URL: {image_url}")
37
 
38
+ # Call the Groq API to analyze the image
39
  # Call the Groq API to analyze the image
40
  completion = client.chat.completions.create(
41
+ model="llama-3.2-90b-vision-preview",
42
  messages=[{
43
  "role": "user",
44
+ "content": [
45
+ {"type": "text", "text": instruction},
46
+ {"type": "image_url", "image_url": {"url": image_url}}
47
+ ]
48
  }],
49
+ temperature=0.7,
50
  max_tokens=512,
51
  top_p=1,
52
  stream=False,