SeyedAli commited on
Commit
2123b28
1 Parent(s): e265ffa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -1
README.md CHANGED
@@ -30,7 +30,17 @@ More information needed
30
 
31
  ## Intended uses & limitations
32
 
33
- More information needed
 
 
 
 
 
 
 
 
 
 
34
 
35
  ## Training and evaluation data
36
 
 
30
 
31
  ## Intended uses & limitations
32
 
33
+ This is how to use this model in an example
34
+ ```python
35
+ from peft import PeftModel
36
+ from transformers import pipeline
37
+ modelname="SeyedAli/Persian-Text-Sentiment-Bert-LORA"
38
+ tokenizer=AutoTokenizer.from_pretrained("HooshvareLab/bert-base-parsbert-uncased",model_max_length=100, add_special_tokens = True)
39
+ model=AutoModelForSequenceClassification.from_pretrained("HooshvareLab/bert-base-parsbert-uncased",num_labels=2,id2label=id2label,label2id=label2id)
40
+ model = PeftModel.from_pretrained(model, modelname)
41
+ pipe = pipeline("text-classification", model=model,tokenizer=tokenizer)
42
+ pipe('خیلی کتاب خوبی بود')
43
+ ```
44
 
45
  ## Training and evaluation data
46