Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,4 +80,13 @@ def predict(text):
|
|
| 80 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 81 |
|
| 82 |
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 81 |
|
| 82 |
|
| 83 |
+
demo = gr.Interface(
|
| 84 |
+
fn=predict,
|
| 85 |
+
inputs=gr.Textbox(lines=3, placeholder="Unesi tekst...", label="Text"),
|
| 86 |
+
outputs=gr.Label(num_top_classes=5, label="Sentiment"),
|
| 87 |
+
title="Sentiment Analysis (BiLSTM, fastText hr)",
|
| 88 |
+
description="Five-class sentiment: mixed, negative, neutral, positive, sarcastic.",
|
| 89 |
+
examples=["Volim kavu", "Ovo je grozno i mrzim ga", "Dan je bio ok"],
|
| 90 |
+
)
|
| 91 |
+
|
| 92 |
+
demo.launch()
|