Spaces:
Runtime error
Runtime error
Matt C
commited on
Commit
•
7186326
1
Parent(s):
ffa1b22
tweak
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ tokenizer = AutoTokenizer.from_pretrained("s-nlp/roberta_toxicity_classifier")
|
|
11 |
model = AutoModelForSequenceClassification.from_pretrained("s-nlp/roberta_toxicity_classifier")
|
12 |
|
13 |
# prepare the input
|
14 |
-
batch = tokenizer.encode(
|
15 |
|
16 |
# inference
|
17 |
result = model(batch)
|
|
|
11 |
model = AutoModelForSequenceClassification.from_pretrained("s-nlp/roberta_toxicity_classifier")
|
12 |
|
13 |
# prepare the input
|
14 |
+
batch = tokenizer.encode(txt, return_tensors='pt')
|
15 |
|
16 |
# inference
|
17 |
result = model(batch)
|