Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,8 @@ def parse_ticket_image(image, question):
|
|
| 42 |
# Processing the image
|
| 43 |
if image:
|
| 44 |
try:
|
| 45 |
-
|
|
|
|
| 46 |
except Exception as e:
|
| 47 |
traceback.print_exc()
|
| 48 |
error = str(e)
|
|
|
|
| 42 |
# Processing the image
|
| 43 |
if image:
|
| 44 |
try:
|
| 45 |
+
if image.mode != "RGB":
|
| 46 |
+
document = image.convert("RGB")
|
| 47 |
except Exception as e:
|
| 48 |
traceback.print_exc()
|
| 49 |
error = str(e)
|