Instructions to use sinanyuksel/test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sinanyuksel/test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="sinanyuksel/test")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("sinanyuksel/test") model = AutoModelForSequenceClassification.from_pretrained("sinanyuksel/test", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from sinanyuksel/test: direct link, hf CLI and curl.
- Browser
- Download file 1.73 kB
-
https://huggingface.co/sinanyuksel/test/resolve/main/README.md
- Command line
-
hf download hf://sinanyuksel/test/README.md
-
curl -L -o README.md https://huggingface.co/sinanyuksel/test/resolve/main/README.md
1.73 kB
| license: mit | |
| language: | |
| - tr | |
| metrics: | |
| - accuracy | |
| pipeline_tag: text-classification | |
| language: | |
| - tr | |
| tags: | |
| - text-classification | |
| - emotion | |
| - pytorch | |
| datasets: | |
| - emotion | |
| metrics: | |
| - Accuracy, F1 Score | |
| --- | |
| # bert-base-turkish-cased-emotion | |
| ## Model description: | |
| [bert-base-turkish-cased](https://huggingface.co/dbmdz/bert-base-turkish-cased) finetuned on Turkish film comments shared in beyazperde.com with the help of BERTurk pretrained language model using PyTorch and Huggingface Transformers library. | |
| ``` | |
| learning rate 2e-5, | |
| batch size 32, | |
| num_train_epochs=5, | |
| optimizer=AdamW | |
| ``` | |
| ## Model Performance | |
| precision recall f1-score support | |
| 0 0.93 0.93 0.93 1333 | |
| 1 0.93 0.93 0.93 1333 | |
| accuracy 0.93 2666 | |
| macro avg 0.93 0.93 0.93 2666 | |
| weighted avg 0.93 0.93 0.93 2666 | |
| ## How to Use the model: | |
| ```python | |
| from transformers import pipeline | |
| classifier = pipeline("text-classification", | |
| model='zafercavdar/distilbert-base-turkish-cased-emotion', | |
| return_all_scores=True) | |
| prediction = classifier("Bu kütüphaneyi seviyorum, en iyi yanı kolay kullanımı.", ) | |
| print(prediction) | |
| """ | |
| Output: | |
| [ | |
| [ | |
| {'label': 'sadness', 'score': 0.0026786490343511105}, | |
| {'label': 'joy', 'score': 0.6600754261016846}, | |
| {'label': 'love', 'score': 0.3203163146972656}, | |
| {'label': 'anger', 'score': 0.004358913749456406}, | |
| {'label': 'fear', 'score': 0.002354539930820465}, | |
| {'label': 'surprise', 'score': 0.010216088965535164} | |
| ] | |
| ] | |
| """ | |
| ``` | |
| ## Dataset: | |
| [Beyazoerde.com reviews](https://huggingface.co/datasets/sinanyuksel/beyazperde). |