cta2106 commited on
Commit
50c2eab
1 Parent(s): 13a626e
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ def predict_fn(text: str) -> str:
7
  tokenizer = LongformerTokenizer.from_pretrained("allenai/longformer-base-4096")
8
 
9
  p = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
10
- return p(text)[1]["label"]
11
 
12
 
13
  gr.Interface(predict_fn, "textbox", "label").launch()
 
7
  tokenizer = LongformerTokenizer.from_pretrained("allenai/longformer-base-4096")
8
 
9
  p = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
10
+ return p(text)[0]["label"]
11
 
12
 
13
  gr.Interface(predict_fn, "textbox", "label").launch()