Spaces:
Sleeping
Sleeping
okeowo1014
commited on
Commit
•
85dd2d2
1
Parent(s):
98da3ab
Update train.py
Browse files
train.py
CHANGED
@@ -3,7 +3,9 @@ import tensorflow as tf
|
|
3 |
from tensorflow.keras.preprocessing.image import ImageDataGenerator
|
4 |
from tensorflow.keras.applications import VGG16
|
5 |
from tensorflow.keras.layers import Flatten, Dense
|
6 |
-
from huggingface_hub import push_to_hub_keras
|
|
|
|
|
7 |
# from huggingface_hub import upload_file
|
8 |
from huggingface_hub import HfApi
|
9 |
api = HfApi()
|
@@ -94,8 +96,7 @@ tf.saved_model.save(model, export_dir)
|
|
94 |
|
95 |
# Upload the model to your Hugging Face space repository
|
96 |
push_to_hub_keras(
|
97 |
-
model
|
98 |
-
# model, # Point to the SavedModel directory
|
99 |
repo_id="okeowo1014/kerascatanddog",
|
100 |
commit_message="cats and dog image classifier with transfer learning",
|
101 |
tags=["image-classifier", "data-augmentation", "class-weights"],
|
|
|
3 |
from tensorflow.keras.preprocessing.image import ImageDataGenerator
|
4 |
from tensorflow.keras.applications import VGG16
|
5 |
from tensorflow.keras.layers import Flatten, Dense
|
6 |
+
# from huggingface_hub import push_to_hub_keras
|
7 |
+
from huggingface_hub import hf_hub_url, push_to_hub_keras
|
8 |
+
|
9 |
# from huggingface_hub import upload_file
|
10 |
from huggingface_hub import HfApi
|
11 |
api = HfApi()
|
|
|
96 |
|
97 |
# Upload the model to your Hugging Face space repository
|
98 |
push_to_hub_keras(
|
99 |
+
model, # model, # Point to the SavedModel directory
|
|
|
100 |
repo_id="okeowo1014/kerascatanddog",
|
101 |
commit_message="cats and dog image classifier with transfer learning",
|
102 |
tags=["image-classifier", "data-augmentation", "class-weights"],
|