From 5fcdba7558335eab36bdaa3d4f6fb6114caf1547 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sat, 20 Jul 2024 19:25:44 +0700 Subject: [PATCH] Create ai_model.py --- models/ai_model.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 models/ai_model.py diff --git a/models/ai_model.py b/models/ai_model.py new file mode 100644 index 0000000..29ba35a --- /dev/null +++ b/models/ai_model.py @@ -0,0 +1,15 @@ +# ai_model.py +import tensorflow as tf + +# Define the AI model +model = tf.keras.models.Sequential([ + tf.keras.layers.Dense(64, activation="relu", input_shape=(1,)), + tf.keras.layers.Dense(64, activation="relu"), + tf.keras.layers.Dense(1) +]) + +# Compile the model +model.compile(optimizer="adam", loss="mean_squared_error") + +# Train the model +model.fit(X_train, y_train, epochs=10)