Dodanie 'prediction.py'
This commit is contained in:
parent
515272460e
commit
a03280a6a0
20
prediction.py
Normal file
20
prediction.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import pandas
|
||||||
|
import os
|
||||||
|
import tensorflow
|
||||||
|
|
||||||
|
build_number = int(os.environ['BUILD_NUMBER'])
|
||||||
|
|
||||||
|
reloaded = tensorflow.keras.models.load_model('test')
|
||||||
|
|
||||||
|
x_to_test = pandas.read_csv('./X_test.csv')
|
||||||
|
y_to_test = pandas.read_csv('./Y_test.csv')
|
||||||
|
|
||||||
|
accu = reloaded.evaluate(x_to_test, y_to_test)
|
||||||
|
|
||||||
|
|
||||||
|
with open('metrics.csv', 'a') as file:
|
||||||
|
file.write(f'{build_number},{accu}\n')
|
||||||
|
|
||||||
|
pre = reloaded.predict(x_to_test)
|
||||||
|
|
||||||
|
pre.tofile('prediction.csv', sep=',', format='%s')
|
Loading…
Reference in New Issue
Block a user