Instructions to use areumtecnologia/bert-text-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use areumtecnologia/bert-text-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="areumtecnologia/bert-text-classification")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("areumtecnologia/bert-text-classification") model = AutoModelForSequenceClassification.from_pretrained("areumtecnologia/bert-text-classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
1.0.1
Browse files
README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
---
|
| 4 |
+
This model is a test for educational proposits.
|
| 5 |
+
|
| 6 |
+
To use:
|
| 7 |
+
|
| 8 |
+
from transformers import pipeline
|
| 9 |
+
|
| 10 |
+
classifier = pipeline("sentiment-analysis", model="./model", tokenizer="./model")
|
| 11 |
+
|
| 12 |
+
# Exemplo de texto para classificação
|
| 13 |
+
texts = ["I love this movie!", "This is a terrible movie.", "Awesome!", "Very bad!"]
|
| 14 |
+
results = classifier(texts)
|
| 15 |
+
|
| 16 |
+
for text, result in zip(texts, results):
|
| 17 |
+
print(f"Text: {text}\nPrediction: {result}\n")
|