wiraindrak commited on
Commit
a60235f
1 Parent(s): 9b8a04e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -7,7 +7,8 @@ pretrained_name = "w11wo/indonesian-roberta-base-sentiment-classifier"
7
  sentiment = pipeline(
8
  "sentiment-analysis",
9
  model=pretrained_name,
10
- tokenizer=pretrained_name
 
11
  )
12
 
13
  examples = [
@@ -22,6 +23,7 @@ demo = gr.Interface(
22
  fn=sentiment_analysis,
23
  inputs=gr.Textbox(placeholder="Enter a sentence here..."),
24
  outputs="label",
 
25
  examples=[examples])
26
 
27
  if __name__ == "__main__":
 
7
  sentiment = pipeline(
8
  "sentiment-analysis",
9
  model=pretrained_name,
10
+ tokenizer=pretrained_name,
11
+ return_all_scores=True
12
  )
13
 
14
  examples = [
 
23
  fn=sentiment_analysis,
24
  inputs=gr.Textbox(placeholder="Enter a sentence here..."),
25
  outputs="label",
26
+ interpretation="default",
27
  examples=[examples])
28
 
29
  if __name__ == "__main__":