andrewsunanda commited on
Commit
3ef14c9
·
1 Parent(s): d5063eb

Update prediction.py

Browse files
Files changed (1) hide show
  1. prediction.py +6 -4
prediction.py CHANGED
@@ -20,15 +20,17 @@ def preprocess_input_image(img_path):
20
  x /= 255.
21
  return x, img1
22
 
23
- main_path= '\\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 = '\\food\\Train'
30
- valid_path = '\\food\\Valid'
31
- test_path = '\\food\\Test'
 
 
 
32
 
33
  # Create data generators for training, validation, and testing
34
  train_datagen = ImageDataGenerator(
 
20
  x /= 255.
21
  return x, img1
22
 
 
23
 
24
  # Define batch size and image size
25
  batch_size = 256
26
  img_size = (64, 64)
27
  # Define paths to the data folders
28
+ # Define paths to the data folders
29
+ script_dir = os.path.dirname(os.path.abspath(__file__))
30
+
31
+ train_path = os.path.join(script_dir, 'food', 'Train')
32
+ valid_path = os.path.join(script_dir, 'food', 'Valid')
33
+ test_path = os.path.join(script_dir, 'food', 'Test')
34
 
35
  # Create data generators for training, validation, and testing
36
  train_datagen = ImageDataGenerator(