Matt C commited on
Commit
6767b70
1 Parent(s): 2268b75

prototyping s-nlp roberta again

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,8 +12,8 @@ txt = st.text_area('Text to analyze', '''
12
  ''')
13
 
14
  # load tokenizer and model weights
15
- tokenizer = RobertaTokenizer.from_pretrained('SkolkovoInstitute/roberta_toxicity_classifier')
16
- model = RobertaForSequenceClassification.from_pretrained('SkolkovoInstitute/roberta_toxicity_classifier')
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')