Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,19 +48,16 @@ interface = gr.Interface(
|
|
48 |
placeholder="Enter text in English or Chinese... / θΎε
₯δΈζζθ±ζε₯ε",
|
49 |
label="π Input Text / θΎε
₯ζζ¬"
|
50 |
),
|
51 |
-
|
|
|
52 |
title="π Manipulative Language Detector / ζηΊ΅ζ§θ―θ¨θ―ε«ε¨",
|
53 |
-
description="π§ͺ θΎε
₯θ±ζζδΈζε₯εοΌη³»η»ε°ε€ζε
Άζ―ε¦ε
ε«ζηΊ΅ζ§θ―θ¨γ\nEnter a sentence in English or Chinese to detect if it's manipulative.
|
|
|
54 |
examples=[
|
55 |
["If you really cared, you'd do what I say."],
|
56 |
["δ½ δΈη±ζε°±θ―ζη»ζηοΌ"],
|
57 |
["δ»ε€©η倩ζ°ηδΈιγ"]
|
58 |
]
|
59 |
-
)
|
60 |
-
|
61 |
-
interface.launch()
|
62 |
-
|
63 |
-
|
64 |
---
|
65 |
|
66 |
π **Disclaimer / ε
θ΄£ε£°ζοΌ**
|
|
|
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="π§ͺ θΎε
₯θ±ζζδΈζε₯εοΌη³»η»ε°ε€ζε
Άζ―ε¦ε
ε«ζηΊ΅ζ§θ―θ¨γ\nEnter a sentence in English or Chinese to detect if it's manipulative.\nβοΈ Powered by fine-tuned mDeBERTa-v3 model on manually annotated Chinese/English data.
|
55 |
+
",
|
56 |
examples=[
|
57 |
["If you really cared, you'd do what I say."],
|
58 |
["δ½ δΈη±ζε°±θ―ζη»ζηοΌ"],
|
59 |
["δ»ε€©η倩ζ°ηδΈιγ"]
|
60 |
]
|
|
|
|
|
|
|
|
|
|
|
61 |
---
|
62 |
|
63 |
π **Disclaimer / ε
θ΄£ε£°ζοΌ**
|