Spaces:
Sleeping
Sleeping
model
Browse files
.DS_Store
CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
|
|
app.py
CHANGED
@@ -50,7 +50,7 @@ if not st.session_state.filled:
|
|
50 |
elif s == 'distilbert-base-uncased-finetuned-sst-2-english':
|
51 |
pline = pipeline(task="sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
|
52 |
else:
|
53 |
-
model = AutoModelForSequenceClassification.from_pretrained(
|
54 |
model.eval()
|
55 |
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
|
56 |
encoding = tokenizer(tweet, return_tensors="pt")
|
@@ -144,7 +144,7 @@ if submit and tweet:
|
|
144 |
elif box == 'distilbert-base-uncased-finetuned-sst-2-english':
|
145 |
pline = pipeline(task="sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
|
146 |
else:
|
147 |
-
model = AutoModelForSequenceClassification.from_pretrained(
|
148 |
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
|
149 |
encoding = tokenizer(tweet, return_tensors="pt")
|
150 |
encoding = {k: v.to(model.device) for k,v in encoding.items()}
|
|
|
50 |
elif s == 'distilbert-base-uncased-finetuned-sst-2-english':
|
51 |
pline = pipeline(task="sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
|
52 |
else:
|
53 |
+
model = AutoModelForSequenceClassification.from_pretrained("Ptato/Modified-Bert-Toxicity-Classification")
|
54 |
model.eval()
|
55 |
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
|
56 |
encoding = tokenizer(tweet, return_tensors="pt")
|
|
|
144 |
elif box == 'distilbert-base-uncased-finetuned-sst-2-english':
|
145 |
pline = pipeline(task="sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
|
146 |
else:
|
147 |
+
model = AutoModelForSequenceClassification.from_pretrained("Ptato/Modified-Bert-Toxicity-Classification")
|
148 |
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
|
149 |
encoding = tokenizer(tweet, return_tensors="pt")
|
150 |
encoding = {k: v.to(model.device) for k,v in encoding.items()}
|