Update sentiments.html
Browse files- sentiments.html +0 -20
sentiments.html
CHANGED
@@ -114,7 +114,6 @@
|
|
114 |
// Initialize the sentiment analysis model
|
115 |
async function initializeModel() {
|
116 |
sentimentAnalysis = await pipeline('sentiment-analysis', 'Xenova/distilbert-base-uncased-finetuned-sst-2-english');
|
117 |
-
reviewer = await pipeline('sentiment-analysis', 'Xenova/distilbert-base-uncased-finetuned-sst-2-english');
|
118 |
toxic_classifier = await pipeline('text-classification', 'Xenova/toxic-bert');
|
119 |
}
|
120 |
|
@@ -135,25 +134,6 @@
|
|
135 |
document.getElementById("outputArea2").innerText = JSON.stringify(result, null, 2);
|
136 |
}
|
137 |
|
138 |
-
async function analyzeReview() {
|
139 |
-
|
140 |
-
const textFieldValue = document.getElementById("reviewText").value.trim();
|
141 |
-
|
142 |
-
const result = await reviewer(textFieldValue);
|
143 |
-
|
144 |
-
document.getElementById("reviewOutputArea").innerText = JSON.stringify(result, null, 2);
|
145 |
-
|
146 |
-
}
|
147 |
-
|
148 |
-
async function analyzeReview2() {
|
149 |
-
|
150 |
-
const textFieldValue = document.getElementById("reviewText2").value.trim();
|
151 |
-
|
152 |
-
const result = await reviewer(textFieldValue, { topk: 5 });
|
153 |
-
|
154 |
-
document.getElementById("reviewOutputArea2").innerText = JSON.stringify(result, null, 2);
|
155 |
-
|
156 |
-
}
|
157 |
|
158 |
async function toxicReview() {
|
159 |
|
|
|
114 |
// Initialize the sentiment analysis model
|
115 |
async function initializeModel() {
|
116 |
sentimentAnalysis = await pipeline('sentiment-analysis', 'Xenova/distilbert-base-uncased-finetuned-sst-2-english');
|
|
|
117 |
toxic_classifier = await pipeline('text-classification', 'Xenova/toxic-bert');
|
118 |
}
|
119 |
|
|
|
134 |
document.getElementById("outputArea2").innerText = JSON.stringify(result, null, 2);
|
135 |
}
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
async function toxicReview() {
|
139 |
|