fahrendrakhoirul commited on
Commit
73de29c
1 Parent(s): 249f917

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -4
README.md CHANGED
@@ -25,7 +25,7 @@ This model leverages IndoBERT for understanding language and a Long Short-Term M
25
  ```python
26
  import torch.nn as nn
27
  from huggingface_hub import PyTorchModelHubMixin
28
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
29
 
30
  class IndoBertLSTMEcommerceReview(nn.Module, PyTorchModelHubMixin):
31
      def __init__(self, bert):
@@ -44,9 +44,7 @@ class IndoBertLSTMEcommerceReview(nn.Module, PyTorchModelHubMixin):
44
        probabilities = self.sigmoid(logits)
45
        return probabilities
46
 
47
- bert = AutoModelForSequenceClassification.from_pretrained("indobenchmark/indobert-base-p1",
48
- num_labels=3,
49
- problem_type="multi_label_classification")
50
  tokenizer = AutoTokenizer.from_pretrained("fahrendrakhoirul/indobert-lstm-finetuned-ecommerce-reviews")
51
  model = IndoBertLSTMEcommerceReview.from_pretrained("fahrendrakhoirul/indobert-lstm-finetuned-ecommerce-reviews", bert=bert)
52
  ```
 
25
  ```python
26
  import torch.nn as nn
27
  from huggingface_hub import PyTorchModelHubMixin
28
+ from transformers import BertModel, AutoTokenizer
29
 
30
  class IndoBertLSTMEcommerceReview(nn.Module, PyTorchModelHubMixin):
31
      def __init__(self, bert):
 
44
        probabilities = self.sigmoid(logits)
45
        return probabilities
46
 
47
+ bert = BertModel.from_pretrained("indobenchmark/indobert-base-p1")
 
 
48
  tokenizer = AutoTokenizer.from_pretrained("fahrendrakhoirul/indobert-lstm-finetuned-ecommerce-reviews")
49
  model = IndoBertLSTMEcommerceReview.from_pretrained("fahrendrakhoirul/indobert-lstm-finetuned-ecommerce-reviews", bert=bert)
50
  ```