AIOmarRehan commited on
Commit
f70f418
Β·
verified Β·
1 Parent(s): 2756fe4

Update app/gradio_app.py

Browse files
Files changed (1) hide show
  1. 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 = Image.open(sample["image"]).convert("RGB")
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: