wiraindrak commited on
Commit
d961c51
·
1 Parent(s): a60235f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,12 +12,12 @@ sentiment = pipeline(
12
  )
13
 
14
  examples = [
15
- "Ada apa dengan Jokowi di istana negara?",
16
  ]
17
 
18
  def sentiment_analysis(text):
19
  output = sentiment(text)
20
- return output[0]
21
 
22
  demo = gr.Interface(
23
  fn=sentiment_analysis,
 
12
  )
13
 
14
  examples = [
15
+ "Masyarakat sangat kecewa dengan tragedi Kanjuruhan",
16
  ]
17
 
18
  def sentiment_analysis(text):
19
  output = sentiment(text)
20
+ return {elm["label"]: elm["score"] for elm in output[0]}
21
 
22
  demo = gr.Interface(
23
  fn=sentiment_analysis,