Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,26 +48,17 @@ interface = gr.Interface(
|
|
48 |
placeholder="Enter text in English or Chinese... / 输入中文或英文句子",
|
49 |
label="📝 Input Text / 输入文本"
|
50 |
),
|
51 |
-
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True, max_length=256).to(device)
|
52 |
outputs=gr.Markdown(label="📊 Prediction / 预测结果"),
|
53 |
title="🔍 Manipulative Language Detector / 操纵性语言识别器",
|
54 |
-
description="
|
55 |
-
|
56 |
-
|
57 |
-
["If you really cared, you'd do what I say."],
|
58 |
-
["你不爱我就证明给我看!"],
|
59 |
-
["今天的天气真不错。"]
|
60 |
-
]
|
61 |
-
---
|
62 |
|
63 |
📌 **Disclaimer / 免责声明:**
|
64 |
This system is for **research and educational purposes only**.
|
65 |
-
It **does not guarantee accuracy** and **should not be used as legal or clinical evidence**.
|
66 |
本工具仅用于**学术研究与教学演示**,不构成法律、医疗或其他正式用途的依据。
|
67 |
|
68 |
-
|
69 |
-
---
|
70 |
-
|
71 |
🤖 **Model Info**:
|
72 |
- Model: `LilithHu/mbert-manipulative-detector`
|
73 |
- Base: `mDeBERTa-v3` multilingual pre-trained model
|
@@ -75,9 +66,13 @@ It **does not guarantee accuracy** and **should not be used as legal or clinical
|
|
75 |
|
76 |
🌐 Built with Gradio and hosted on HuggingFace Spaces.
|
77 |
""",
|
|
|
|
|
|
|
|
|
|
|
78 |
theme="default",
|
79 |
allow_flagging="never"
|
80 |
)
|
81 |
|
82 |
-
|
83 |
interface.launch()
|
|
|
48 |
placeholder="Enter text in English or Chinese... / 输入中文或英文句子",
|
49 |
label="📝 Input Text / 输入文本"
|
50 |
),
|
|
|
51 |
outputs=gr.Markdown(label="📊 Prediction / 预测结果"),
|
52 |
title="🔍 Manipulative Language Detector / 操纵性语言识别器",
|
53 |
+
description="""
|
54 |
+
🧪 输入英文或中文句子,系统将判断其是否包含操纵性语言。
|
55 |
+
Enter a sentence in English or Chinese to detect if it's manipulative.
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
📌 **Disclaimer / 免责声明:**
|
58 |
This system is for **research and educational purposes only**.
|
59 |
+
It **does not guarantee accuracy** and **should not be used as legal or clinical evidence**.
|
60 |
本工具仅用于**学术研究与教学演示**,不构成法律、医疗或其他正式用途的依据。
|
61 |
|
|
|
|
|
|
|
62 |
🤖 **Model Info**:
|
63 |
- Model: `LilithHu/mbert-manipulative-detector`
|
64 |
- Base: `mDeBERTa-v3` multilingual pre-trained model
|
|
|
66 |
|
67 |
🌐 Built with Gradio and hosted on HuggingFace Spaces.
|
68 |
""",
|
69 |
+
examples=[
|
70 |
+
["If you really cared, you'd do what I say."],
|
71 |
+
["你不爱我就证明给我看!"],
|
72 |
+
["今天的天气真不错。"]
|
73 |
+
],
|
74 |
theme="default",
|
75 |
allow_flagging="never"
|
76 |
)
|
77 |
|
|
|
78 |
interface.launch()
|