8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def predict_review(text): #1. predict_review encoded_text = encoder.encode(text) encoded_text = tf.cast(encoded_text, tf.float32) prediction = model.predict(tf.expand_dims(encoded_text, 1)) return prediction
review = ('Good movie') #1. predict_review pred = predict_review(review) pred, pred.shape
Error:
NameError Traceback (most recent call last) in 1 review = ('Good movie') #1. predict_review ----> 2 pred = predict_review(review) 3 pred, pred.shape
in predict_review(text) 2 encoded_text = encoder.encode(text) 3 encoded_text = tf.cast(encoded_text, tf.float32) ----> 4 prediction = model.predict(tf.expand_dims(encoded_text, 1)) 5 return prediction
NameError: name 'model' is not defined
The text was updated successfully, but these errors were encountered:
This is not a shap issue. You are attempting to call a variable named model that hasn't been defined.
Sorry, something went wrong.
No branches or pull requests
Please help anyone below is the issue?
def predict_review(text): #1. predict_review
encoded_text = encoder.encode(text)
encoded_text = tf.cast(encoded_text, tf.float32)
prediction = model.predict(tf.expand_dims(encoded_text, 1))
return prediction
review = ('Good movie') #1. predict_review
pred = predict_review(review)
pred, pred.shape
Error:
NameError Traceback (most recent call last)
in
1 review = ('Good movie') #1. predict_review
----> 2 pred = predict_review(review)
3 pred, pred.shape
in predict_review(text)
2 encoded_text = encoder.encode(text)
3 encoded_text = tf.cast(encoded_text, tf.float32)
----> 4 prediction = model.predict(tf.expand_dims(encoded_text, 1))
5 return prediction
NameError: name 'model' is not defined
The text was updated successfully, but these errors were encountered: