模型:
tkurtulus/TurkishAirlines-SentimentAnalysisModel
任务:
文本分类您可以使用 cURL 访问此模型:
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love to fly with Turkish Airlines"}' https://api-inference.huggingface.co/models/tkurtulus/TurkishAirlines-SentimentAnalysisModel
或者使用 Python API:
from transformers import AutoModelForSequenceClassification, AutoTokenizer model = AutoModelForSequenceClassification.from_pretrained("tkurtulus/TurkishAirlines-SentimentAnalysisModel") tokenizer = AutoTokenizer.from_pretrained("tkurtulus/TurkishAirlines-SentimentAnalysisModel") inputs = tokenizer("I love to fly with Turkish Airlines", return_tensors="pt") outputs = model(**inputs)