Spaces:
Runtime error
Runtime error
change model and req
Browse files- requirements.txt +2 -1
- single.py +2 -2
requirements.txt
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
transformers==4.20.1
|
2 |
-
ferret-xai>=0.2.0
|
|
|
|
1 |
transformers==4.20.1
|
2 |
+
ferret-xai>=0.2.0
|
3 |
+
sentencepiece
|
single.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import AutoModelForSequenceClassification, AutoTokenizer, Auto
|
|
4 |
from ferret import Benchmark
|
5 |
from torch.nn.functional import softmax
|
6 |
|
7 |
-
DEFAULT_MODEL = "
|
8 |
|
9 |
|
10 |
@st.cache()
|
@@ -60,7 +60,7 @@ def body():
|
|
60 |
help="Positional index of your target class.",
|
61 |
)
|
62 |
|
63 |
-
text = st.text_input("Text")
|
64 |
|
65 |
compute = st.button("Compute")
|
66 |
|
|
|
4 |
from ferret import Benchmark
|
5 |
from torch.nn.functional import softmax
|
6 |
|
7 |
+
DEFAULT_MODEL = "cardiffnlp/twitter-xlm-roberta-base-sentiment"
|
8 |
|
9 |
|
10 |
@st.cache()
|
|
|
60 |
help="Positional index of your target class.",
|
61 |
)
|
62 |
|
63 |
+
text = st.text_input("Text", "I love your style!")
|
64 |
|
65 |
compute = st.button("Compute")
|
66 |
|