Spaces:
Runtime error
Runtime error
Matt C
commited on
Commit
•
7cf8aab
1
Parent(s):
19c4297
tweak
Browse files
app.py
CHANGED
@@ -3,13 +3,8 @@ import torch
|
|
3 |
import plotly.express as px
|
4 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
the age of wisdom, it was the age of foolishness, it was
|
9 |
-
the epoch of belief, it was the epoch of incredulity, it
|
10 |
-
was the season of Light, it was the season of Darkness, it
|
11 |
-
was the spring of hope, it was the winter of despair, (...)
|
12 |
-
''')
|
13 |
|
14 |
# load tokenizer and model weights
|
15 |
tokenizer = AutoTokenizer.from_pretrained("s-nlp/roberta_toxicity_classifier")
|
|
|
3 |
import plotly.express as px
|
4 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
5 |
|
6 |
+
deftxt = "I hate you cancerous insects so much"
|
7 |
+
txt = st.text_area('Text to analyze', deftxt)
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
# load tokenizer and model weights
|
10 |
tokenizer = AutoTokenizer.from_pretrained("s-nlp/roberta_toxicity_classifier")
|