Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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-
|
| 41 |
messages=[{
|
| 42 |
"role": "user",
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
}],
|
| 46 |
-
temperature=
|
| 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,
|