shobrunjb commited on
Commit
a9dc165
·
verified ·
1 Parent(s): 9f96359
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -3,10 +3,12 @@ from transformers import BertTokenizer, TFBertForSequenceClassification
3
  import tensorflow as tf
4
  import numpy as np
5
 
6
- # Load model and tokenizer from Hugging Face Hub
 
7
  model_name = "shobrunjb/mtl-indobert-fake-review-product"
 
8
  tokenizer = BertTokenizer.from_pretrained('shobrunjb/mtl-indobert-fake-review-product')
9
- model = TFBertForSequenceClassification.from_pretrained(model_name)
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