fahrendrakhoirul commited on
Commit
59ffdf3
1 Parent(s): 0e554d6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -26,7 +26,7 @@ Clearly define the three output classes and their corresponding labels:
26
  ```python
27
  import torch.nn as nn
28
  from huggingface_hub import PyTorchModelHubMixin
29
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
30
 
31
  class IndoBertCNNEcommerceReview(nn.Module, PyTorchModelHubMixin):
32
  def __init__(self, bert):
@@ -50,7 +50,7 @@ class IndoBertCNNEcommerceReview(nn.Module, PyTorchModelHubMixin):
50
  probabilities = self.sigmoid(logits)
51
  return probabilities
52
 
53
- bert = AutoModelForSequenceClassification.from_pretrained("indobenchmark/indobert-base-p1",
54
  num_labels=3,
55
  problem_type="multi_label_classification")
56
  tokenizer = AutoTokenizer.from_pretrained("fahrendrakhoirul/indobert-cnn-finetuned-ecommerce-reviews")
 
26
  ```python
27
  import torch.nn as nn
28
  from huggingface_hub import PyTorchModelHubMixin
29
+ from transformers import BertModel, AutoTokenizer
30
 
31
  class IndoBertCNNEcommerceReview(nn.Module, PyTorchModelHubMixin):
32
  def __init__(self, bert):
 
50
  probabilities = self.sigmoid(logits)
51
  return probabilities
52
 
53
+ bert = BertModel.from_pretrained("indobenchmark/indobert-base-p1",
54
  num_labels=3,
55
  problem_type="multi_label_classification")
56
  tokenizer = AutoTokenizer.from_pretrained("fahrendrakhoirul/indobert-cnn-finetuned-ecommerce-reviews")