Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def classify(text):
|
|
26 |
pred = torch.argmax(probs).item()
|
27 |
confidence = min(probs[pred].item(), 0.95) # 限制置信度最大为95%
|
28 |
percent = round(confidence * 100, 2)
|
29 |
-
result = f"
|
30 |
return result
|
31 |
|
32 |
|
@@ -42,12 +42,16 @@ interface = gr.Interface(
|
|
42 |
title="🧠 Manipulative Language Detector / 操纵性语言识别器",
|
43 |
description="""
|
44 |
🔍 This tool detects **emotionally manipulative language** in English or Chinese digital communication.
|
|
|
|
|
45 |
---
|
46 |
|
47 |
📌 **Disclaimer / 免责声明:**
|
48 |
This system is for **research and educational purposes only**.
|
49 |
It **does not guarantee accuracy** and **should not be used as legal or clinical evidence**.
|
50 |
本工具仅用于**学术研究与教学演示**,不构成法律、医疗或其他正式用途的依据。
|
|
|
|
|
51 |
---
|
52 |
|
53 |
🤖 **Model Info**:
|
|
|
26 |
pred = torch.argmax(probs).item()
|
27 |
confidence = min(probs[pred].item(), 0.95) # 限制置信度最大为95%
|
28 |
percent = round(confidence * 100, 2)
|
29 |
+
result = f"Prediction / 预测:\n{labels[pred]}\n📊 Confidence /置信度: {percent}%"
|
30 |
return result
|
31 |
|
32 |
|
|
|
42 |
title="🧠 Manipulative Language Detector / 操纵性语言识别器",
|
43 |
description="""
|
44 |
🔍 This tool detects **emotionally manipulative language** in English or Chinese digital communication.
|
45 |
+
|
46 |
+
|
47 |
---
|
48 |
|
49 |
📌 **Disclaimer / 免责声明:**
|
50 |
This system is for **research and educational purposes only**.
|
51 |
It **does not guarantee accuracy** and **should not be used as legal or clinical evidence**.
|
52 |
本工具仅用于**学术研究与教学演示**,不构成法律、医疗或其他正式用途的依据。
|
53 |
+
|
54 |
+
|
55 |
---
|
56 |
|
57 |
🤖 **Model Info**:
|