Instructions to use Shenzy/Sentence_Classification4DesignTutor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Shenzy/Sentence_Classification4DesignTutor with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Shenzy/Sentence_Classification4DesignTutor")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Shenzy/Sentence_Classification4DesignTutor") model = AutoModelForSequenceClassification.from_pretrained("Shenzy/Sentence_Classification4DesignTutor", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Shenzy/Sentence_Classification4DesignTutor: direct link, hf CLI and curl.
- Browser
- Download file 1.45 kB
-
https://huggingface.co/Shenzy/Sentence_Classification4DesignTutor/resolve/d753f86d01faf618b9dda71bfbd7030d28e24bf8/README.md
- Command line
-
hf download hf://Shenzy/Sentence_Classification4DesignTutor@d753f86d01faf618b9dda71bfbd7030d28e24bf8/README.md
-
curl -L -o README.md https://huggingface.co/Shenzy/Sentence_Classification4DesignTutor/resolve/d753f86d01faf618b9dda71bfbd7030d28e24bf8/README.md
1.45 kB
metadata
tags: autotrain
language: en
widget:
- text: I love AutoTrain 🤗
datasets:
- Shenzy/autotrain-data-sentence_classification
co2_eq_emissions: 0.00986494387043499
Model Trained Using AutoTrain
- Problem type: Multi-class Classification
- Model ID: 1166943329
- CO2 Emissions (in grams): 0.00986494387043499
Validation Metrics
- Loss: 0.6447726488113403
- Accuracy: 0.8263473053892215
- Macro F1: 0.7776555055392036
- Micro F1: 0.8263473053892215
- Weighted F1: 0.8161511591973788
- Macro Precision: 0.8273504273504274
- Micro Precision: 0.8263473053892215
- Weighted Precision: 0.8266697374481806
- Macro Recall: 0.7615518744551003
- Micro Recall: 0.8263473053892215
- Weighted Recall: 0.8263473053892215
Usage
You can use cURL to access this model:
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/Shenzy/autotrain-sentence_classification-1166943329
Or Python API:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("Shenzy/autotrain-sentence_classification-1166943329", use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained("Shenzy/autotrain-sentence_classification-1166943329", use_auth_token=True)
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
outputs = model(**inputs)