andrewsunanda commited on
Commit
516dfb5
·
1 Parent(s): 2c6d2d6

Update prediction.py

Browse files
Files changed (1) hide show
  1. prediction.py +4 -4
prediction.py CHANGED
@@ -20,15 +20,15 @@ def preprocess_input_image(img_path):
20
  x /= 255.
21
  return x, img1
22
 
23
- main_path= 'D:\\tugas_andrew_DS\\phase_2\\m2\\food'
24
 
25
  # Define batch size and image size
26
  batch_size = 256
27
  img_size = (64, 64)
28
  # Define paths to the data folders
29
- train_path = os.path.join(main_path, 'Train')
30
- valid_path = os.path.join(main_path, 'Valid')
31
- test_path = os.path.join(main_path, 'Test')
32
 
33
  # Create data generators for training, validation, and testing
34
  train_datagen = ImageDataGenerator(
 
20
  x /= 255.
21
  return x, img1
22
 
23
+ dataset = load_dataset('andrewsunanda/fast_food_image_classification')
24
 
25
  # Define batch size and image size
26
  batch_size = 256
27
  img_size = (64, 64)
28
  # Define paths to the data folders
29
+ train_path = dataset['train'].features['filepath']
30
+ valid_path = dataset['validation'].features['filepath']
31
+ test_path = dataset['test'].features['filepath']
32
 
33
  # Create data generators for training, validation, and testing
34
  train_datagen = ImageDataGenerator(