WENior commited on
Commit
b8e5011
·
verified ·
1 Parent(s): 54a1367

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
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("text-classification", model="ChrisLiewJY/BERTweet-Hedge")
 
 
 
 
 
 
 
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. 一些简单的中文 & 英文规则打分函数 ----------