fahrendrakhoirul commited on
Commit
33faf29
1 Parent(s): e5333ab

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -4
README.md CHANGED
@@ -35,7 +35,7 @@ Optionally, provide brief examples of reviews that would fall into each category
35
  ```python
36
  import torch.nn as nn
37
  from huggingface_hub import PyTorchModelHubMixin
38
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
39
 
40
  class IndoBertEcommerceReview(nn.Module, PyTorchModelHubMixin):
41
  def __init__(self, bert):
@@ -49,9 +49,7 @@ class IndoBertEcommerceReview(nn.Module, PyTorchModelHubMixin):
49
  probabilities = self.sigmoid(logits)
50
  return probabilities
51
 
52
- bert = AutoModelForSequenceClassification.from_pretrained("indobenchmark/indobert-base-p1",
53
- num_labels=3,
54
- problem_type="multi_label_classification")
55
  tokenizer = AutoTokenizer.from_pretrained("fahrendrakhoirul/indobert-finetuned-ecommerce-reviews")
56
  model = IndoBertEcommerceReview.from_pretrained("fahrendrakhoirul/indobert-finetuned-ecommerce-reviews", bert=bert)
57
  ```
 
35
  ```python
36
  import torch.nn as nn
37
  from huggingface_hub import PyTorchModelHubMixin
38
+ from transformers import BertModel, AutoTokenizer
39
 
40
  class IndoBertEcommerceReview(nn.Module, PyTorchModelHubMixin):
41
  def __init__(self, bert):
 
49
  probabilities = self.sigmoid(logits)
50
  return probabilities
51
 
52
+ bert = BertModel.from_pretrained("indobenchmark/indobert-base-p1")
 
 
53
  tokenizer = AutoTokenizer.from_pretrained("fahrendrakhoirul/indobert-finetuned-ecommerce-reviews")
54
  model = IndoBertEcommerceReview.from_pretrained("fahrendrakhoirul/indobert-finetuned-ecommerce-reviews", bert=bert)
55
  ```