arianmo commited on
Commit
3abdaaf
·
verified ·
1 Parent(s): 6c272d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -3,14 +3,15 @@ import matplotlib.pyplot as plt
3
  import numpy as np
4
  from datasets import load_dataset
5
 
6
- # Load the chest X-ray classification dataset
7
- dataset = load_dataset("keremberke/chest-xray-classification")
8
 
9
  def show_samples(label):
10
  # Get samples from the dataset
11
  images = []
12
  for i in range(5): # Show 5 images
13
- images.append(dataset['train'][i]['image']) # Adjust as needed
 
14
 
15
  # Create a grid of images
16
  fig, axes = plt.subplots(1, 5, figsize=(15, 5))
 
3
  import numpy as np
4
  from datasets import load_dataset
5
 
6
+ # Load the chest X-ray classification dataset with the 'full' configuration
7
+ dataset = load_dataset("keremberke/chest-xray-classification", "full")
8
 
9
  def show_samples(label):
10
  # Get samples from the dataset
11
  images = []
12
  for i in range(5): # Show 5 images
13
+ img = dataset['train'][i]['image'] # Adjust as needed
14
+ images.append(img)
15
 
16
  # Create a grid of images
17
  fig, axes = plt.subplots(1, 5, figsize=(15, 5))