app.py
CHANGED
@@ -3,10 +3,12 @@ from transformers import BertTokenizer, TFBertForSequenceClassification
|
|
3 |
import tensorflow as tf
|
4 |
import numpy as np
|
5 |
|
6 |
-
|
|
|
7 |
model_name = "shobrunjb/mtl-indobert-fake-review-product"
|
|
|
8 |
tokenizer = BertTokenizer.from_pretrained('shobrunjb/mtl-indobert-fake-review-product')
|
9 |
-
|
10 |
|
11 |
def predict(text):
|
12 |
# Tokenize input text
|
|
|
3 |
import tensorflow as tf
|
4 |
import numpy as np
|
5 |
|
6 |
+
from transformers import BertForSequenceClassification
|
7 |
+
|
8 |
model_name = "shobrunjb/mtl-indobert-fake-review-product"
|
9 |
+
model = BertForSequenceClassification.from_pretrained(model_name)
|
10 |
tokenizer = BertTokenizer.from_pretrained('shobrunjb/mtl-indobert-fake-review-product')
|
11 |
+
|
12 |
|
13 |
def predict(text):
|
14 |
# Tokenize input text
|