Update Dockefile and clean code

This commit is contained in:
PawelDopierala 2024-04-27 18:20:17 +02:00
parent b5739c0a43
commit 83d2766149
4 changed files with 6 additions and 4 deletions

View File

@ -10,4 +10,9 @@ RUN mkdir -p /.kaggle && chown -R jenkins /.kaggle
USER jenkins
COPY data_processing.py .
COPY create_model.py .
COPY helper.py .
COPY predict_price.py .
WORKDIR .

View File

@ -25,5 +25,3 @@ model.compile(optimizer=adam, loss='mean_squared_error')
model.fit(X_train, Y_train, epochs=20, batch_size=32, validation_data=(X_dev, Y_dev))
model.save('hp_model.h5')

View File

@ -1,5 +1,6 @@
import tensorflow as tf
def prepare_tensors(df):
Y = df["Price"]
X = df.drop("Price", axis=1)

View File

@ -1,6 +1,5 @@
import pandas as pd
from keras.models import load_model
from helper import prepare_tensors
hp_test = pd.read_csv('hp_test.csv')
@ -11,5 +10,4 @@ model = load_model('hp_model.h5')
test_predictions = model.predict(X_test)
predictions_df = pd.DataFrame(test_predictions, columns=["Predicted_Price"])
predictions_df.to_csv('hp_test_predictions.csv', index=False)