Rendika commited on
Commit
13a82e3
1 Parent(s): d2db775

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -115,16 +115,16 @@ This repository contains a trained IndoBERTweet model for text classification. T
115
  To use this model, you can load it using the `transformers` library from Hugging Face.
116
 
117
  ```python
118
- from transformers import AutoTokenizer, AutoModelForSequenceClassification
 
119
 
120
- model_path = "path_to_your_model_directory"
121
 
122
- tokenizer = AutoTokenizer.from_pretrained(model_path)
123
- model = AutoModelForSequenceClassification.from_pretrained(model_path)
124
 
125
- # Example usage
126
- inputs = tokenizer("Your input text here", return_tensors="pt")
127
- outputs = model(**inputs)
128
  ```
129
 
130
  ## Conclusion
 
115
  To use this model, you can load it using the `transformers` library from Hugging Face.
116
 
117
  ```python
118
+ # Use a pipeline as a high-level helper
119
+ from transformers import pipeline
120
 
121
+ pipe = pipeline("text-classification", model="Rendika/Trained-indobertweet-balanced-dataset")
122
 
123
+ # Load model directly
124
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
125
 
126
+ tokenizer = AutoTokenizer.from_pretrained("Rendika/Trained-indobertweet-balanced-dataset")
127
+ model = AutoModelForSequenceClassification.from_pretrained("Rendika/Trained-indobertweet-balanced-dataset")
 
128
  ```
129
 
130
  ## Conclusion