Spaces:
Runtime error
Runtime error
DrishtiSharma
commited on
Commit
•
b3900f9
1
Parent(s):
ba1b8bc
Update app.py
Browse files
app.py
CHANGED
@@ -14,12 +14,11 @@ def decide(text):
|
|
14 |
padded_tokens = pad_sequences(tokenized_text, maxlen= 200)
|
15 |
result = model.predict(padded_tokens, verbose=0)
|
16 |
if result[:] > 0.6 :
|
17 |
-
|
18 |
elif result[:] < 0.4:
|
19 |
-
|
20 |
else:
|
21 |
-
|
22 |
-
return output
|
23 |
|
24 |
|
25 |
|
|
|
14 |
padded_tokens = pad_sequences(tokenized_text, maxlen= 200)
|
15 |
result = model.predict(padded_tokens, verbose=0)
|
16 |
if result[:] > 0.6 :
|
17 |
+
return f"Positive review with {result : .0%} confidence score"
|
18 |
elif result[:] < 0.4:
|
19 |
+
return f"Negative review with {result : .0%} confidence score"
|
20 |
else:
|
21 |
+
return "Neutral Review"
|
|
|
22 |
|
23 |
|
24 |
|