Text Classification
Transformers
Safetensors
Spanish
bert
BERT
Transformers
BETO
Clickbait
text-embeddings-inference
Instructions to use taniwasl/clickbait_es with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use taniwasl/clickbait_es with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="taniwasl/clickbait_es")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("taniwasl/clickbait_es") model = AutoModelForSequenceClassification.from_pretrained("taniwasl/clickbait_es", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from taniwasl/clickbait_es: direct link, hf CLI and curl.
- Browser
- Download file 2.04 kB
-
https://huggingface.co/taniwasl/clickbait_es/resolve/main/README.md
- Command line
-
hf download hf://taniwasl/clickbait_es/README.md
-
curl -L -o README.md https://huggingface.co/taniwasl/clickbait_es/resolve/main/README.md
2.04 kB
| library_name: transformers | |
| tags: | |
| - BERT | |
| - Transformers | |
| - BETO | |
| - Clickbait | |
| license: mit | |
| language: | |
| - es | |
| pipeline_tag: text-classification | |
| # BETO Spanish Clickbaits Model | |
| This clickbait analysis model is based on the BETO, a Spanish variant of BERT. | |
| ## Model Details | |
| BETO is a BERT model trained on a big Spanish corpus. BETO is of size similar to a BERT-Base and was trained with the Whole Word Masking technique. | |
| [BETO huggingface](https://huggingface.co/dccuchile/bert-base-spanish-wwm-cased) | |
| Model fine-tuned with a news (around ~30k) of several Spanish Newspapers. | |
| ## Training evaluate | |
| Using transformers | |
| ``` | |
| BATCH_SIZE = 100 | |
| NUM_PROCS = 32 | |
| LR = 0.00005 | |
| EPOCHS = 5 | |
| MAX_LENGTH = 25 | |
| MODEL = 'dccuchile/bert-base-spanish-wwm-cased' | |
| {'eval_loss': 0.0386480949819088, | |
| 'eval_accuracy': 0.9872786230980294, | |
| 'eval_runtime': 10.0476, | |
| 'eval_samples_per_second': 398.999, | |
| 'eval_steps_per_second': 4.081, | |
| 'epoch': 5.0} | |
| ``` | |
| ## Uses | |
| This model is designed to classify newspaper news as clickbaits or not. | |
| You can see a use case in this url: | |
| [Spanish Newspapers](https://clickbait.taniwa.es/) | |
| ### Direct Use | |
| ``` | |
| from transformers import ( | |
| AutoTokenizer, | |
| AutoModelForSequenceClassification, | |
| TextClassificationPipeline, | |
| ) | |
| tokenizer = AutoTokenizer.from_pretrained("taniwasl/clickbait_es") | |
| model = AutoModelForSequenceClassification.from_pretrained("taniwasl/clickbait_es") | |
| review_text = 'La explosión destruye parcialmente el edificio, Egipto' | |
| nlp = TextClassificationPipeline(task = "text-classification", | |
| model = model, | |
| tokenizer = tokenizer, | |
| max_length = 25, | |
| truncation=True, | |
| add_special_tokens=True | |
| ) | |
| print(nlp(review_text)) | |
| ``` | |
| ## License Disclaimer | |
| The license MIT best describes our intentions for our work. | |
| However we are not sure that all the datasets used to train BETO have licenses compatible with MIT (specially for commercial use). | |
| Please use at your own discretion only for no commercial use. |