Rendika commited on
Commit
b023498
1 Parent(s): edea322

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -126,16 +126,16 @@ The model was evaluated using precision, recall, and F1 scores, with the followi
126
  To use this model, you can load it using the Hugging Face Transformers library:
127
 
128
  ```python
129
- from transformers import AutoTokenizer, AutoModelForSequenceClassification
 
130
 
131
- model_path = "path_to_your_model_directory_or_hub_repo"
132
 
133
- tokenizer = AutoTokenizer.from_pretrained(model_path)
134
- model = AutoModelForSequenceClassification.from_pretrained(model_path)
135
 
136
- # Example usage
137
- inputs = tokenizer("Your text here", return_tensors="pt")
138
- outputs = model(**inputs)
139
  ```
140
 
141
  ## Conclusion
 
126
  To use this model, you can load it using the Hugging Face Transformers library:
127
 
128
  ```python
129
+ # Use a pipeline as a high-level helper
130
+ from transformers import pipeline
131
 
132
+ pipe = pipeline("text-classification", model="Rendika/Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset")
133
 
134
+ # Load model directly
135
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
136
 
137
+ tokenizer = AutoTokenizer.from_pretrained("Rendika/Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset")
138
+ model = AutoModelForSequenceClassification.from_pretrained("Rendika/Trained-DistilBERT-Indonesia-Presidential-Election-Balanced-Dataset")
 
139
  ```
140
 
141
  ## Conclusion