andrewsunanda commited on
Commit
565cebb
·
1 Parent(s): a255901

Update prediction.py

Browse files
Files changed (1) hide show
  1. prediction.py +8 -6
prediction.py CHANGED
@@ -23,17 +23,19 @@ def preprocess_input_image(img_path):
23
  x /= 255.
24
  return x, img1
25
 
26
- dataset_path = "andrewsunanda/fast_food_image_classification"
27
-
28
 
29
  # Define batch size and image size
30
  batch_size = 256
31
  img_size = (64, 64)
32
  # Define paths to the data folders
33
- dataset = load_dataset(dataset_path)
34
- train_path = dataset['train'].cache_files[0].split('train')[0] + 'train'
35
- valid_path = dataset['valid'].cache_files[0].split('valid')[0] + 'valid'
36
- test_path = dataset['test'].cache_files[0].split('test')[0] + 'test'
 
 
 
37
 
38
  # Create data generators for training, validation, and testing
39
  train_datagen = ImageDataGenerator(
 
23
  x /= 255.
24
  return x, img1
25
 
26
+
 
27
 
28
  # Define batch size and image size
29
  batch_size = 256
30
  img_size = (64, 64)
31
  # Define paths to the data folders
32
+ dataset_path = 'andrewsunanda/fast_food_image_classification'
33
+
34
+
35
+ # Define the paths to the train, validation, and test folders
36
+ train_path = os.path.join(dataset_path, 'Train')
37
+ valid_path = os.path.join(dataset_path, 'Valid')
38
+ test_path = os.path.join(dataset_path, 'Test')
39
 
40
  # Create data generators for training, validation, and testing
41
  train_datagen = ImageDataGenerator(