Update app.py
Browse files
app.py
CHANGED
|
@@ -13,13 +13,6 @@ except Exception as e:
|
|
| 13 |
print(f"Error loading model: {e}")
|
| 14 |
exit()
|
| 15 |
|
| 16 |
-
def decode_image_from_base64(base64_str):
|
| 17 |
-
# Decode the base64 string to bytes
|
| 18 |
-
image_data = base64.b64decode(base64_str)
|
| 19 |
-
# Convert the bytes into a PIL image
|
| 20 |
-
image = Image.open(BytesIO(image_data))
|
| 21 |
-
return image
|
| 22 |
-
|
| 23 |
def predict_image(image):
|
| 24 |
"""
|
| 25 |
Process the uploaded image and return the top 3 predictions.
|
|
|
|
| 13 |
print(f"Error loading model: {e}")
|
| 14 |
exit()
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
def predict_image(image):
|
| 17 |
"""
|
| 18 |
Process the uploaded image and return the top 3 predictions.
|