|
---
|
|
language: en
|
|
tags:
|
|
- text-classification
|
|
- hazard-detection
|
|
datasets:
|
|
- your-dataset-name
|
|
license: apache-2.0
|
|
model_name: Quintu/roberta-large-1280-hazard
|
|
library_name: transformers
|
|
pipeline_tag: text-classification
|
|
---
|
|
# Quintu/roberta-large-1280-hazard
|
|
|
|
Mô hình `Quintu/roberta-large-1280-hazard` được thiết kế để thực hiện phân loại văn bản liên quan đến phát hiện nguy cơ.
|
|
|
|
## Cách sử dụng
|
|
|
|
Dưới đây là cách sử dụng mô hình này với thư viện `transformers`:
|
|
|
|
```python
|
|
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
|
|
|
# Tải mô hình và tokenizer
|
|
model_name = "Quintu/roberta-large-1280-hazard"
|
|
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
|
|
|
# Sử dụng mô hình để phân loại văn bản
|
|
text = "This is an example text to classify."
|
|
inputs = tokenizer(text, return_tensors="pt")
|
|
outputs = model(**inputs)
|
|
|
|
# Dự đoán
|
|
logits = outputs.logits
|
|
print(logits)
|
|
|