Spaces:
Runtime error
Runtime error
Commit
·
11a5ad4
1
Parent(s):
82725f3
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,9 @@ 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 |
|
38 |
|
39 |
# 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 |
+
content = "Sentiment: %s, prediction score: %.4f", %(mapping[prob_max[0]], prob[0][prob_max][0]))
|
37 |
+
st.write(content)
|
38 |
+
# st.write("Sentiment:", mapping[prob_max[0]], "Prediction Score:", prob[0][prob_max][0])
|
39 |
|
40 |
|
41 |
# x = st.slider('Select a value')
|