Spaces:
Runtime error
Runtime error
fix: set return_all_scores to true
Browse files
app.py
CHANGED
@@ -41,7 +41,8 @@ LABEL_MAPPING_REVERSED = {v:k for k,v in LABEL_MAPPING.items() }
|
|
41 |
#pipeline
|
42 |
text_cls_pipeline = pipeline(task='sentiment-analysis',
|
43 |
tokenizer=tokenizer,
|
44 |
-
model=model
|
|
|
45 |
|
46 |
css_text = """<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">"""
|
47 |
def render_html(items: List[Dict]):
|
|
|
41 |
#pipeline
|
42 |
text_cls_pipeline = pipeline(task='sentiment-analysis',
|
43 |
tokenizer=tokenizer,
|
44 |
+
model=model,
|
45 |
+
return_all_scores=True)
|
46 |
|
47 |
css_text = """<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">"""
|
48 |
def render_html(items: List[Dict]):
|