Diwank Tomer commited on
Commit ·
dd61dd9
1
Parent(s): 15e6b39
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
+
|
| 5 |
+
# diwank/dyda-deberta-pair
|
| 6 |
+
|
| 7 |
+
Deberta-based Daily Dialog style dialog-act annotations classification model. It takes two sentences as inputs (one previous and one current of a dialog). The previous sentence can be an empty string if this is the first utterance of a speaker in a dialog. Outputs one of four labels (exactly as in the [daily-dialog dataset](https://huggingface.co/datasets/daily_dialog) ): *__dummy__ (0), inform (1), question (2), directive (3), commissive (4)*
|
| 8 |
+
|
| 9 |
+
## Usage
|
| 10 |
+
|
| 11 |
+
```python
|
| 12 |
+
from simpletransformers.classification import (
|
| 13 |
+
ClassificationModel, ClassificationArgs
|
| 14 |
+
)
|
| 15 |
+
|
| 16 |
+
model = ClassificationModel("deberta", "diwank/dyda-deberta-pair")
|
| 17 |
+
convert_to_label = lambda n: ["__dummy__ (0), inform (1), question (2), directive (3), commissive (4)".split(', ')[i] for i in n]
|
| 18 |
+
|
| 19 |
+
predictions, raw_outputs = model.predict([["Say what is the meaning of life?", "I dont know"]])
|
| 20 |
+
convert_to_label(predictions) # inform (1)
|
| 21 |
+
```
|