This commit is contained in:
Yevhenii Poliakov 2023-05-14 22:35:05 +02:00
parent 26a2ed79b8
commit df3eba461b

View File

@ -34,8 +34,8 @@ model.compile(loss='mean_squared_error', optimizer='adam')
model.fit(X_train, y_train, batch_size=64, epochs=10, validation_data=(X_test, y_test)) model.fit(X_train, y_train, batch_size=64, epochs=10, validation_data=(X_test, y_test))
# Make predictions on new data # Make predictions on new data
new_writer = 'John Smith' new_writer = 'Jim Cash'
new_writer_encoded = encoder.transform([new_writer]) new_writer_encoded = encoder.transform([new_writer])
rating_prediction = model.predict(new_writer_encoded) rating_prediction = model.predict(new_writer_encoded)
print("Predicted rating for the writer 'John Smith':", rating_prediction) print("Predicted rating for the writer 'Jim Cash':", rating_prediction)