Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -23,8 +23,7 @@ model = AutoModelForSequenceClassification.from_pretrained("paragon-analytics/AD
|
|
23 |
|
24 |
# Build a pipeline object for predictions
|
25 |
# Note: return_all_scores is deprecated, use top_k=None instead
|
26 |
-
pred = transformers.pipeline("text-classification", model=model,
|
27 |
-
tokenizer=tokenizer, return_all_scores=True) # This will likely issue a warning or error in newer versions.
|
28 |
|
29 |
# SHAP explainer
|
30 |
# Check SHAP documentation for potential changes in Explainer initialization if issues arise.
|
|
|
23 |
|
24 |
# Build a pipeline object for predictions
|
25 |
# Note: return_all_scores is deprecated, use top_k=None instead
|
26 |
+
pred = transformers.pipeline("text-classification", model=model, tokenizer=tokenizer, top_k=None, device=device) # Added device=device for consistency
|
|
|
27 |
|
28 |
# SHAP explainer
|
29 |
# Check SHAP documentation for potential changes in Explainer initialization if issues arise.
|