ngamulin commited on
Commit
fab32c2
·
verified ·
1 Parent(s): 8a3e41a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -10,4 +10,13 @@ def predict(text):
10
  features = vectorizer.transform([text])
11
  return str(model.predict(features)[0])
12
 
13
- gr.Interface(fn=predict, inputs="text", outputs="text").launch()
 
 
 
 
 
 
 
 
 
 
10
  features = vectorizer.transform([text])
11
  return str(model.predict(features)[0])
12
 
13
+ demo = gr.Interface(
14
+ fn=predict,
15
+ inputs=gr.Textbox(lines=3, placeholder="Unesi tekst...", label="Text"),
16
+ outputs=gr.Label(num_top_classes=1, label="Sentiment"),
17
+ title="Sentiment Analysis (SVM, TF-IDF)",
18
+ description="Five-class sentiment: mixed, negative, neutral, positive, sarcastic.",
19
+ examples=["Volim kavu", "Ovaj doktor je loš", "Dan je bio ok"],
20
+ )
21
+
22
+ demo.launch()