Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
|
@@ -5,19 +5,19 @@ import io
|
|
| 5 |
import tensorflow as tf
|
| 6 |
|
| 7 |
|
| 8 |
-
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
| 12 |
|
| 13 |
|
| 14 |
-
from transformers import DistilBertTokenizerFast
|
| 15 |
|
| 16 |
-
tokenizer = DistilBertTokenizerFast.from_pretrained("distilbert-base-uncased")
|
| 17 |
|
| 18 |
-
from transformers import pipeline
|
| 19 |
|
| 20 |
-
model = pipeline("text-classification", model="distilbert-base-uncased-finetuned-sst-2-english")
|
| 21 |
|
| 22 |
|
| 23 |
|
|
|
|
| 5 |
import tensorflow as tf
|
| 6 |
|
| 7 |
|
| 8 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 9 |
|
| 10 |
+
tokenizer = AutoTokenizer.from_pretrained("chillies/distilbert-course-review-classification")
|
| 11 |
+
model = AutoModelForSequenceClassification.from_pretrained("chillies/distilbert-course-review-classification")
|
| 12 |
|
| 13 |
|
| 14 |
+
# from transformers import DistilBertTokenizerFast
|
| 15 |
|
| 16 |
+
# tokenizer = DistilBertTokenizerFast.from_pretrained("distilbert-base-uncased")
|
| 17 |
|
| 18 |
+
# from transformers import pipeline
|
| 19 |
|
| 20 |
+
# model = pipeline("text-classification", model="distilbert-base-uncased-finetuned-sst-2-english")
|
| 21 |
|
| 22 |
|
| 23 |
|