cta2106 commited on
Commit
b2830ea
1 Parent(s): b176070

fixed output

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,7 +7,8 @@ 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)
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)["label"]
11
 
12
 
13
  gr.Interface(predict_fn, "textbox", "label").launch()
14
+