keras license:apache-2.0 region:us
---
license: apache-2.0
metrics:
- accuracy
library_name: keras
---
## Image Classification Widget

Use the following code to add an image classification widget to your Jupyter Notebook:

```python
import ipywidgets as widgets
from IPython.display import display, Image
import numpy as np
from tensorflow.keras.preprocessing import image

# ... (copy the rest of your code here)

display(upload_button)
display(prediction_label)

### Usage Instructions

1. Copy and paste the provided code into your Jupyter Notebook.
2. Ensure that you have the required dependencies installed (e.g., `ipywidgets`, `tensorflow`).
3. Run the notebook cell containing the code.
4. Use the "Upload" button to select an image for classification.
5. The predicted class ("Dog" or "Cat") will be displayed.

Feel free to customize the code to suit your specific use case.