How to use from the
Use from the
Scikit-learn library
from huggingface_hub import hf_hub_download
import joblib
model = joblib.load(
	hf_hub_download("ZakyF/sentiment-analysis", "sklearn_model.joblib")
)
# only load pickle files from sources you trust
# read more about it here https://skops.readthedocs.io/en/stable/persistence.html

Sentiment Analysis

Model SVM dan Naive Bayes untuk mengklasifikasikan ulasan ke dalam kategori Bagus, Normal, atau Buruk menggunakan PRDECT-ID Dataset.

Deskripsi

Model ini menganalisis ulasan pelanggan Tokopedia untuk menghasilkan insight seperti rekomendasi perbaikan pengiriman atau kualitas produk.

Penggunaan

import pickle
from sklearn.preprocessing import LabelEncoder, StandardScaler

# Load model dan preprocessing
svm_model = pickle.load(open('svm_model.pkl', 'rb'))
scaler = pickle.load(open('scaler.pkl', 'rb'))
le_sentiment = pickle.load(open('le_sentiment.pkl', 'rb'))
le_emotion = pickle.load(open('le_emotion.pkl', 'rb'))

# Contoh prediksi
data = [[5, 'Positive', 'Happy']]  # Rating, Sentiment, Emotion
data_scaled = scaler.transform(data)
prediksi = svm_model.predict(data_scaled)
print(prediksi)  # Output: ['Bagus']
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train ZakyF/sentiment-analysis