PhoBERT Stock Sentiment — VN30
Model phân tích cảm xúc tin tức chứng khoán Việt Nam cho 30 mã cổ phiếu VN30.
Nhãn
| label_id | Nhãn | Ý nghĩa |
|---|---|---|
| 0 | NEG | Tiêu cực |
| 1 | POS | Tích cực |
| 2 | NEU | Trung tính |
Cách dùng
!pip install transformers torch underthesea pandas tqdm huggingface_hub
!git clone https://huggingface.co/mnguyn11/phobert-stock-sentiment-vn30
import sys
sys.path.append("/content/phobert-stock-sentiment-vn30")
from modeling import StockSentimentPredictor
predictor = StockSentimentPredictor()
# Test 1 câu
print(predictor.predict("ACB", "ACB tăng trần hôm nay"))
# Test batch
df_test = pd.read_excel("/content/test_file.xlsx")
df_result = predictor.predict_batch(df_test)
df_result.to_excel("/content/result.xlsx", index=False)
print(df_result[["stock", "text", "pred_label", "confidence"]].head(10))
Thông tin model
- Base model:
vinai/phobert-base - Max length: 256 tokens
- Các mã VN30: ACB, BCM, BID, BVH, CTG, FPT, GAS, GVR, HDB, HPG, MBB, MSN, MWG, PLX, POW, SAB, SHB, SSB, SSI, STB, TCB, TPB, VCB, VHM, VIB, VIC, VJC, VNM, VPB, VRE
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support