sreepathi-ravikumar commited on
Commit
88fa970
·
verified ·
1 Parent(s): 967ebf8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -31,12 +31,19 @@ def _payload(q: str):
31
  if data[0]=="Text":
32
  content=data[1]
33
  else:
34
- content={
35
- "type": "image_url",
36
- "image_url": {
37
- "url": data[1]
 
 
 
 
 
 
 
38
  }
39
- }
40
  info=config.config
41
  system=info[0][data[3]]
42
 
 
31
  if data[0]=="Text":
32
  content=data[1]
33
  else:
34
+ # For images, content must be an array with text + image
35
+ content=[
36
+ {
37
+ "type": "text",
38
+ "text": "Analyze and explain this image in detail"
39
+ },
40
+ {
41
+ "type": "image_url",
42
+ "image_url": {
43
+ "url": data[1]
44
+ }
45
  }
46
+ ]
47
  info=config.config
48
  system=info[0][data[3]]
49