Spaces:
Runtime error
Runtime error
Commit
·
812c39c
1
Parent(s):
e3a361e
Update app.py
Browse files
app.py
CHANGED
@@ -33,8 +33,7 @@ if x:
|
|
33 |
prob = tf.nn.softmax(preds, axis=1).numpy()
|
34 |
prob_max = np.argmax(prob, axis=1)
|
35 |
st.write("Your review is:", x)
|
36 |
-
|
37 |
-
st.write("Sentiment: %s, score: %.4f", %(mapping[prob_max], prob[0][prob_max]))
|
38 |
|
39 |
|
40 |
# x = st.slider('Select a value')
|
|
|
33 |
prob = tf.nn.softmax(preds, axis=1).numpy()
|
34 |
prob_max = np.argmax(prob, axis=1)
|
35 |
st.write("Your review is:", x)
|
36 |
+
st.write("Sentiment:", mapping[prob_max], ", Score:", prob[0][prob_max][0])
|
|
|
37 |
|
38 |
|
39 |
# x = st.slider('Select a value')
|