Spaces:
Runtime error
Runtime error
cta2106
commited on
Commit
•
50c2eab
1
Parent(s):
13a626e
fixing
Browse files
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)[
|
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()
|