Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,7 @@ def preprocess(text):
|
|
76 |
return " ".join(ptokens)
|
77 |
|
78 |
|
79 |
-
def
|
80 |
sentence = preprocess(sentence)
|
81 |
|
82 |
model_path = config.MODEL_PATH
|
@@ -107,6 +107,7 @@ interface = gr.Interface(
|
|
107 |
inputs='text',
|
108 |
outputs=['label'],
|
109 |
title='Latvian Twitter Sentiment Analysis',
|
|
|
110 |
description='Get the positive/neutral/negative sentiment for the given input.'
|
111 |
)
|
112 |
|
|
|
76 |
return " ".join(ptokens)
|
77 |
|
78 |
|
79 |
+
def predict_sentiment(sentence):
|
80 |
sentence = preprocess(sentence)
|
81 |
|
82 |
model_path = config.MODEL_PATH
|
|
|
107 |
inputs='text',
|
108 |
outputs=['label'],
|
109 |
title='Latvian Twitter Sentiment Analysis',
|
110 |
+
examples= ["Es mīlu Tevi","Es ienīstu kafiju"]
|
111 |
description='Get the positive/neutral/negative sentiment for the given input.'
|
112 |
)
|
113 |
|