Vladyslav Humennyy commited on
Commit
a50233e
·
1 Parent(s): 2ba0e3d

Fix gradio

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -93,13 +93,14 @@ def user(user_message, image_data, history: list):
93
  # Store both text and image in a single message with base64 in metadata
94
  updated_history.append({
95
  "role": "user",
96
- "content": [
97
- {"type": "text", "text": text_content},
98
- {
99
- "type": "image",
100
- "image": tmp_path, # Use 'image' key instead of 'path'
 
 
101
  },
102
- ],
103
  })
104
  has_content = True
105
  elif stripped_message:
 
93
  # Store both text and image in a single message with base64 in metadata
94
  updated_history.append({
95
  "role": "user",
96
+ "content": text_content
97
+ })
98
+ updated_history.append({
99
+ "role": "user",
100
+ "content": {
101
+ "path": tmp_path,
102
+ "alt_text": "User uploaded image"
103
  },
 
104
  })
105
  has_content = True
106
  elif stripped_message: