Rasooli commited on
Commit
b60fae1
·
verified ·
1 Parent(s): e7d595c

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,32 +1,24 @@
1
  ---
2
  language:
3
  - fa
 
4
  tags:
5
  - sentiment-analysis
6
  - text-classification
7
  - tensorflow
8
- - transformers
9
- license: apache-2.0
10
  ---
11
 
12
  # ParsBERT Sentiment (Fine-tuned)
13
 
14
- This repository contains a Persian sentiment analysis model fine-tuned from `HooshvareLab/bert-base-parsbert-uncased`.
15
-
16
- ## Sentiment labels (label mapping)
17
 
 
18
  - 0 → Negative
19
  - 1 → Positive
20
  - 2 → Neutral
21
 
22
-
23
- ## Files
24
- - Transformer base model (TensorFlow) saved with `save_pretrained`
25
- - Tokenizer saved with `save_pretrained`
26
- - Classification head / full-model weights: `bert_sentiment_weights.h5` (Keras weights)
27
-
28
- ## How to use
29
- Because the final model is a custom Keras graph, load by:
30
- 1) loading tokenizer and base ParsBERT
31
- 2) rebuilding the same Keras architecture
32
- 3) loading the weights file
 
1
  ---
2
  language:
3
  - fa
4
+ license: apache-2.0
5
  tags:
6
  - sentiment-analysis
7
  - text-classification
8
  - tensorflow
9
+ - keras
10
+ base_model: HooshvareLab/bert-base-parsbert-uncased
11
  ---
12
 
13
  # ParsBERT Sentiment (Fine-tuned)
14
 
15
+ This repository contains a Persian sentiment model trained using a custom TensorFlow/Keras head on top of ParsBERT.
 
 
16
 
17
+ ## Label mapping
18
  - 0 → Negative
19
  - 1 → Positive
20
  - 2 → Neutral
21
 
22
+ ## Notes
23
+ This is a custom Keras architecture, so `pipeline()` may not work automatically.
24
+ Use the provided weights file: `parsbert_sentiment.weights.h5` and rebuild the model architecture as in the training code.
 
 
 
 
 
 
 
 
parsbert_base_tf/tf_model.h5 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f38661273fdf5d5372fb6b1625386e394bf8f42ba454afd24e2d43849181e1b0
3
  size 651632616
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9b9d50d666e744a525f3fbf49abc1e5c3f90f16a8dc2deaa73b0527d9a4053a
3
  size 651632616
parsbert_sentiment.weights.h5 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2287ff5a9fe7fba663540b19d4b4093190343b6d8f6cfaf8b117618ad3985ca1
3
  size 49264
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8cedd7b1e6fbafc35ab27fd71942498fa4846be8933e261dab1c22a010484dd
3
  size 49264
tokenizer.json CHANGED
@@ -1,7 +1,21 @@
1
  {
2
  "version": "1.0",
3
- "truncation": null,
4
- "padding": null,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  "added_tokens": [
6
  {
7
  "id": 0,
 
1
  {
2
  "version": "1.0",
3
+ "truncation": {
4
+ "direction": "Right",
5
+ "max_length": 128,
6
+ "strategy": "LongestFirst",
7
+ "stride": 0
8
+ },
9
+ "padding": {
10
+ "strategy": {
11
+ "Fixed": 128
12
+ },
13
+ "direction": "Right",
14
+ "pad_to_multiple_of": null,
15
+ "pad_id": 0,
16
+ "pad_type_id": 0,
17
+ "pad_token": "[PAD]"
18
+ },
19
  "added_tokens": [
20
  {
21
  "id": 0,