kenfoo commited on
Commit
ec3d6af
·
verified ·
1 Parent(s): a2b1925

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -33,7 +33,8 @@ def encode_image_to_gallery_dict(image_path):
33
  if not image_path or not isinstance(image_path, str):
34
  return None
35
  try:
36
- return handle_file(image_path)
 
37
  except Exception as e:
38
  print(f"无法读取图片: {image_path}: {e}")
39
  return None
 
33
  if not image_path or not isinstance(image_path, str):
34
  return None
35
  try:
36
+ file_data = handle_file(image_path)
37
+ return {"image": file_data, "caption": ""}
38
  except Exception as e:
39
  print(f"无法读取图片: {image_path}: {e}")
40
  return None