Update app.py
Browse files
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 |
-
|
|
|
|
| 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
|