Commit
·
f7c6ade
1
Parent(s):
2fb9ab8
trying the Russian model in ints original form
Browse files
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 ('
|
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 ('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 |
|