Emmylahot12 commited on
Commit
2476c9f
·
verified ·
1 Parent(s): bde88e4

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +7 -13
model.py CHANGED
@@ -1,17 +1,11 @@
1
- import os
2
  import tensorflow as tf
3
- from tensorflow.keras import layers, models
4
 
5
- os.makedirs("model", exist_ok=True)
6
-
7
- model = models.Sequential([
8
- layers.Input(shape=(100,)),
9
- layers.Dense(256, activation='relu'),
10
- layers.Dense(128, activation='relu'),
11
- layers.Dense(80)
12
  ])
13
 
14
- model.compile(optimizer='adam', loss='mse')
15
- model.save("model/clone_tts_model.h5")
16
-
17
- print("Model saved to model/clone_tts_model.h5")
 
 
1
  import tensorflow as tf
 
2
 
3
+ # Assume you have a trained model already (replace with your own model code)
4
+ model = tf.keras.Sequential([
5
+ tf.keras.layers.Dense(128, activation='relu', input_shape=(784,)),
6
+ tf.keras.layers.Dense(10, activation='softmax')
 
 
 
7
  ])
8
 
9
+ # Save the model to a file
10
+ model.save('my_model.h5') # Save in HDF5 format
11
+ print("Model saved successfully!")