Update app/gradio_app.py
Browse files- app/gradio_app.py +1 -1
app/gradio_app.py
CHANGED
|
@@ -32,7 +32,7 @@ def classify_image(image):
|
|
| 32 |
def get_random_image():
|
| 33 |
# Pick a random sample from the dataset
|
| 34 |
sample = ds.shuffle(seed=random.randint(0, 9999))[0]
|
| 35 |
-
img =
|
| 36 |
return img
|
| 37 |
|
| 38 |
with gr.Blocks(title="Cats vs Dogs Classifier", theme=gr.themes.Soft()) as demo:
|
|
|
|
| 32 |
def get_random_image():
|
| 33 |
# Pick a random sample from the dataset
|
| 34 |
sample = ds.shuffle(seed=random.randint(0, 9999))[0]
|
| 35 |
+
img = sample["image"].convert("RGB") # just ensure RGB mode
|
| 36 |
return img
|
| 37 |
|
| 38 |
with gr.Blocks(title="Cats vs Dogs Classifier", theme=gr.themes.Soft()) as demo:
|