Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
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))
|