aadhi3 commited on
Commit
8eadbcf
·
verified ·
1 Parent(s): 7e4c6be

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +17 -7
README.md CHANGED
@@ -1,17 +1,27 @@
 
 
 
 
 
 
 
 
 
 
1
  # RoBert Emotion Classifier
2
- PyTorch model trained for classification on XYZ dataset.
3
- Save format: state_dict
4
- To load: import Model_class and load state dict.
5
 
6
- ```py
 
 
 
 
7
  from huggingface_hub import hf_hub_download
8
  import torch
9
- from Model_class import MyClassifier # architecture from HF repo cloned or imported manually
10
 
11
- # Download model weights from HuggingFace
12
  model_path = hf_hub_download(repo_id="aadhi3/RoBert_Model", filename="model.pth")
13
 
14
- model = MyClassifier(num_labels=5)
15
  model.load_state_dict(torch.load(model_path, map_location="cpu"))
16
  model.eval()
17
  ```
 
1
+ ---
2
+ library_name: pytorch
3
+ tags:
4
+ - emotion-classification
5
+ - roberta
6
+ - deep-learning
7
+ - transformer
8
+ license: apache-2.0
9
+ ---
10
+
11
  # RoBert Emotion Classifier
 
 
 
12
 
13
+ PyTorch model trained for emotion classification on XYZ dataset.
14
+ Saved format: `state_dict`.
15
+
16
+ ## 🔧 How to Load the Model
17
+ ```python
18
  from huggingface_hub import hf_hub_download
19
  import torch
20
+ from BertEmotionClassifier import BertEmotionClassifier
21
 
 
22
  model_path = hf_hub_download(repo_id="aadhi3/RoBert_Model", filename="model.pth")
23
 
24
+ model = BertEmotionClassifier(num_labels=5)
25
  model.load_state_dict(torch.load(model_path, map_location="cpu"))
26
  model.eval()
27
  ```