Spaces:
Runtime error
Runtime error
Commit
·
b749f9b
1
Parent(s):
e8be0f0
proper lower-casing
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from transformers import
|
2 |
from scipy.special import expit
|
3 |
import numpy as np
|
4 |
import os
|
@@ -8,7 +8,8 @@ from datetime import datetime
|
|
8 |
|
9 |
# set up model
|
10 |
authtoken = os.environ.get("TOKEN") or True
|
11 |
-
tokenizer =
|
|
|
12 |
model = AutoModelForSequenceClassification.from_pretrained("guidecare/feelings_and_issues_large_v2", use_auth_token=authtoken)
|
13 |
all_label_names = list(model.config.id2label.values())
|
14 |
|
|
|
1 |
+
from transformers import RobertaTokenizer, AutoModelForSequenceClassification
|
2 |
from scipy.special import expit
|
3 |
import numpy as np
|
4 |
import os
|
|
|
8 |
|
9 |
# set up model
|
10 |
authtoken = os.environ.get("TOKEN") or True
|
11 |
+
tokenizer = RobertaTokenizer.from_pretrained("guidecare/feelings_and_issues_large_v2", use_auth_token=authtoken)
|
12 |
+
tokenizer.do_lower_case = True
|
13 |
model = AutoModelForSequenceClassification.from_pretrained("guidecare/feelings_and_issues_large_v2", use_auth_token=authtoken)
|
14 |
all_label_names = list(model.config.id2label.values())
|
15 |
|