21 lines
430 B
Python
21 lines
430 B
Python
import os
|
|
|
|
import tensorflow as tf
|
|
import pandas as pd
|
|
|
|
build_no = int(os.environ['BUILD_NUMBER'])
|
|
data = tf.keras.models.load_model('model')
|
|
|
|
x_to_test = pd.read_csv('./X_test.csv')
|
|
y_to_test = pd.read_csv('./Y_test.csv')
|
|
|
|
accu = data.evaluate(x_to_test, y_to_test)
|
|
|
|
|
|
with open('metrics.csv', 'a') as file:
|
|
file.write(f'{build_no},{accu}\n')
|
|
|
|
pre = data.predict(x_to_test)
|
|
|
|
pre.tofile('prediction.csv', sep=',', format='%s')
|