Spaces:
Runtime error
Runtime error
Matt C
commited on
Commit
•
6767b70
1
Parent(s):
2268b75
prototyping s-nlp roberta again
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ txt = st.text_area('Text to analyze', '''
|
|
12 |
''')
|
13 |
|
14 |
# load tokenizer and model weights
|
15 |
-
tokenizer =
|
16 |
-
model =
|
17 |
|
18 |
# prepare the input
|
19 |
batch = tokenizer.encode('txt', return_tensors='pt')
|
|
|
12 |
''')
|
13 |
|
14 |
# load tokenizer and model weights
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained("s-nlp/roberta_toxicity_classifier")
|
16 |
+
model = AutoModelForSequenceClassification.from_pretrained("s-nlp/roberta_toxicity_classifier")
|
17 |
|
18 |
# prepare the input
|
19 |
batch = tokenizer.encode('txt', return_tensors='pt')
|