Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,14 @@ politeness_cls = pipeline("text-classification", model="Intel/polite-guard")
|
|
| 26 |
formality_cls = pipeline("text-classification", model="LenDigLearn/formality-classifier-mdeberta-v3-base")
|
| 27 |
|
| 28 |
# 英文 hedge / uncertainty(委婉/模糊表达)
|
| 29 |
-
hedge_cls = pipeline(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
|
| 32 |
# ---------- 2. 一些简单的中文 & 英文规则打分函数 ----------
|
|
|
|
| 26 |
formality_cls = pipeline("text-classification", model="LenDigLearn/formality-classifier-mdeberta-v3-base")
|
| 27 |
|
| 28 |
# 英文 hedge / uncertainty(委婉/模糊表达)
|
| 29 |
+
hedge_cls = pipeline(
|
| 30 |
+
"text-classification",
|
| 31 |
+
model="HamzaFarhan/English-Fine-Grained-Hedging-Detector",
|
| 32 |
+
device="cpu",
|
| 33 |
+
truncation=True,
|
| 34 |
+
max_length=256,
|
| 35 |
+
padding="max_length"
|
| 36 |
+
)
|
| 37 |
|
| 38 |
|
| 39 |
# ---------- 2. 一些简单的中文 & 英文规则打分函数 ----------
|