okeowo1014 commited on
Commit
28339c2
1 Parent(s): 7d969e1

Update train.py

Browse files
Files changed (1) hide show
  1. train.py +12 -10
train.py CHANGED
@@ -11,7 +11,7 @@ sac = os.getenv('accesstoken')
11
 
12
 
13
  # Define data paths (modify as needed)
14
- train_data_dir = 'train'
15
  validation_data_dir = 'valid'
16
  test_data_dir = 'valid'
17
 
@@ -88,12 +88,14 @@ print('Test accuracy:', test_acc)
88
  export_dir = 'saved_model' # Create a directory for the SavedModel
89
  tf.saved_model.save(model, export_dir)
90
 
91
- # Upload the model to your Hugging Face space repository
92
- upload_file(
93
- model_path=export_dir, # Point to the SavedModel directory
94
- repo_id="okeowo1014/catsanddogs",
95
- commit_message="cats and dog image classifier with transfer learning",
96
- tags=["image-classifier", "data-augmentation", "class-weights"],
97
- include_optimizer=True,
98
- token=sac
99
- )
 
 
 
11
 
12
 
13
  # Define data paths (modify as needed)
14
+ train_data_dir = 'tt'
15
  validation_data_dir = 'valid'
16
  test_data_dir = 'valid'
17
 
 
88
  export_dir = 'saved_model' # Create a directory for the SavedModel
89
  tf.saved_model.save(model, export_dir)
90
 
91
+ # # Upload the model to your Hugging Face space repository
92
+ # upload_file(
93
+ # model_path=export_dir, # Point to the SavedModel directory
94
+ # repo_id="okeowo1014/catsanddogs",
95
+ # commit_message="cats and dog image classifier with transfer learning",
96
+ # tags=["image-classifier", "data-augmentation", "class-weights"],
97
+ # include_optimizer=True,
98
+ # token=sac
99
+ # )
100
+ # Upload the SavedModel directory to Hugging Face Hub
101
+ upload_file(path_or_file=export_dir, repo_id="okeowo1014/catsanddogs", token=sac)