|
--- |
|
license: mit |
|
library_name: unity-sentis |
|
pipeline_tag: zero-shot-classification |
|
--- |
|
|
|
|
|
# Deberta v3 zeroshot for Unity Sentis |
|
|
|
This is the [DeBERTaV3 Model](https://huggingface.co/MoritzLaurer/deberta-v3-base-zeroshot-v1.1-all-33) in the Sentis format to run on Unity 2023. |
|
The model can do one universal classification task: determine whether a hypothesis is "true" or "not true" given a text. |
|
|
|
There are more models of different sizes that are compatible made by [MoritzLaurer](https://huggingface.co/MoritzLaurer) |
|
|
|
## How to Use |
|
|
|
* Ensure Sentis version is 1.4.0-pre.3 |
|
* Create a new scene in Unity 2023 |
|
* Add the DebertaV3.cs file to a GameObject in the scene |
|
* Assign model and vocabulary |
|
* Press play, the classification scores will show in the Console |
|
|
|
# Example Inputs |
|
``` |
|
text = "Angela Merkel is a politician in Germany and leader of the CDU" |
|
|
|
classes = ["This example is about politics", "This example is about economy", "This example is about entertainment", "This example is about environment"] |
|
``` |
|
|
|
# Example Outputs |
|
``` |
|
[politics] Entailment Score: 0.9998765 |
|
|
|
[economy] Entailment Score: 0.0008297313 |
|
|
|
[entertainment] Entailment Score: 4.86502E-05 |
|
|
|
[environment] Entailment Score: 6.163981E-05 |
|
``` |
|
|
|
## Unity Sentis |
|
Sentis is the inference engine for Unity. More can be found about it [here](https://unity.com/products/sentis) |