ngamulin commited on
Commit
276b006
·
verified ·
1 Parent(s): 5d5427a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
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
- gr.Interface(fn=predict, inputs="text", outputs="text").launch()
 
 
 
 
 
 
 
 
 
 
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()