How to use from the
Use from the
Keras library
# !pip install -U keras tensorflow huggingface_hub
# Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here;
# "jax" and "torch" also work for computation once TensorFlow is installed.
import os
os.environ["KERAS_BACKEND"] = "tensorflow"

import keras

model = keras.saving.load_model("hf://Rasooli/ParsBERT-sentiment-fa-finetuned")

ParsBERT Sentiment (Fine-tuned)

This repository contains a Persian sentiment analysis model trained using a custom TensorFlow/Keras classifier on top of ParsBERT.

Label mapping

  • 0 → Negative
  • 1 → Positive
  • 2 → Neutral

Usage note

This is a custom Keras architecture. To use the model, rebuild the architecture and load the provided parsbert_sentiment.weights.h5 file.

Downloads last month
9
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Rasooli/ParsBERT-sentiment-fa-finetuned

Finetuned
(24)
this model