Error: float() argument must be a string or a number, not 'StandardScaler'
.fit method returns the standard scalar object. You are using that to train the model. please use fit_transfor or transform after the fit. like below

sc_x.fit(x)
x = sc_x.transform(x)


or

x = sc_x.fit_transform(x)