davanstrien HF Staff commited on
Commit
251c25d
·
verified ·
1 Parent(s): 42423b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -10
app.py CHANGED
@@ -74,20 +74,12 @@ def extract_metadata(image):
74
  print(f"DEBUG: Outlines Image created: {type(outlines_image)}")
75
  print(f"DEBUG: Outlines Image.image type: {type(outlines_image.image)}")
76
 
77
- # Create Chat prompt with Image
78
- content_list = [
79
- {"type": "text", "text": EXTRACTION_PROMPT},
80
- {"type": "image", "image": outlines_image},
81
- ]
82
- print(f"DEBUG: Content list created: {len(content_list)} items")
83
- print(f"DEBUG: Content[0] type: {content_list[0]['type']}")
84
- print(f"DEBUG: Content[1] type: {content_list[1]['type']}, image type: {type(content_list[1]['image'])}")
85
-
86
  prompt = Chat(
87
  messages=[
88
  {
89
  "role": "user",
90
- "content": content_list,
91
  }
92
  ]
93
  )
 
74
  print(f"DEBUG: Outlines Image created: {type(outlines_image)}")
75
  print(f"DEBUG: Outlines Image.image type: {type(outlines_image.image)}")
76
 
77
+ # Create Chat prompt with Image (using simpler list format)
 
 
 
 
 
 
 
 
78
  prompt = Chat(
79
  messages=[
80
  {
81
  "role": "user",
82
+ "content": [EXTRACTION_PROMPT, outlines_image],
83
  }
84
  ]
85
  )