Sambhavnoobcoder commited on
Commit
8298371
·
1 Parent(s): f7c6ade

checking values of x

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -54,7 +54,7 @@ def get_sentiment(text):
54
  text += [0] * (200 - len(text))
55
  text = np.array(text).reshape(-1, 200)
56
  x = model.predict(text).tolist()[0][0]
57
- return ('positive' if x >= 0.5 else 'negative') + ' відгук!'
58
 
59
  interface = gr.Interface(fn = get_sentiment, inputs = 'text', outputs = 'text', title = 'Kotsko Kyrylo IPS-42 Sentiment140', description = 'Kotsko Kyrylo IPS-42 Sentiment140')
60
 
 
54
  text += [0] * (200 - len(text))
55
  text = np.array(text).reshape(-1, 200)
56
  x = model.predict(text).tolist()[0][0]
57
+ return x
58
 
59
  interface = gr.Interface(fn = get_sentiment, inputs = 'text', outputs = 'text', title = 'Kotsko Kyrylo IPS-42 Sentiment140', description = 'Kotsko Kyrylo IPS-42 Sentiment140')
60