stackofsugar commited on
Commit
9ca38d8
·
verified ·
1 Parent(s): 1d38842

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -4
README.md CHANGED
@@ -29,10 +29,25 @@ pipeline_tag: text-classification
29
 
30
  This model is fine-tuned from the checkpoint of [AIMH/mental-longformer-base-4096](https://huggingface.co/AIMH/mental-longformer-base-4096) using [drmuskangarg/CAMS](https://github.com/drmuskangarg/CAMS/) dataset. For more information about the base Longformer model, please visit their [model page](https://huggingface.co/allenai/longformer-base-4096). We used the same configuration as `AIMH/mental-longformer-base-4096` including their tokenizer.
31
 
32
- # Usage, Citing, and more
33
 
34
- **Under construction, coming soon**
35
 
36
- This model is developed as a part of the author's thesis research. The author wish to acknowledge Universitas Sebelas Maret for the computational resources.
 
37
 
38
- <!-- Todos: github, mental disclaimer, performance -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  This model is fine-tuned from the checkpoint of [AIMH/mental-longformer-base-4096](https://huggingface.co/AIMH/mental-longformer-base-4096) using [drmuskangarg/CAMS](https://github.com/drmuskangarg/CAMS/) dataset. For more information about the base Longformer model, please visit their [model page](https://huggingface.co/allenai/longformer-base-4096). We used the same configuration as `AIMH/mental-longformer-base-4096` including their tokenizer.
31
 
32
+ # Usage
33
 
34
+ If you wish to use my model to infer your dataset or maybe pre-train it further, you can import my model in a Python script/notebook.
35
 
36
+ ```py
37
+ from transformers import LongformerTokenizer, LongformerForSequenceClassification
38
 
39
+ tokenizer = LongformerTokenizer.from_pretrained("aimh/mental-longformer-base-4096")
40
+ model = LongformerForSequenceClassification.from_pretrained("stackofsugar/mentallongformer-cams-finetuned")
41
+ ```
42
+
43
+ If you prefer to use the high-level HuggingFace pipeline to make predictions, you can also do it in a Python script/notebook.
44
+
45
+ ```py
46
+ from transformers import pipeline
47
+
48
+ pipe = pipeline("text-classification", model="stackofsugar/mentallongformer-cams-finetuned", tokenizer="aimh/mental-longformer-base-4096")
49
+ ```
50
+
51
+ # More Information
52
+
53
+ For more information, visit my [GitHub Repo](https://github.com/stackofsugar/depression-causal-analysis).