not-lain commited on
Commit
91c6ed8
·
verified ·
1 Parent(s): fb3cc84

Update the readme file to take into consideration the latest changes

Browse files
Files changed (1) hide show
  1. README.md +11 -4
README.md CHANGED
@@ -8,10 +8,6 @@ language:
8
 
9
  This is a converted version of [Instadeep's](https://huggingface.co/InstaDeepAI) [TunBERT](https://github.com/instadeepai/tunbert/) from nemo to safetensors.
10
 
11
- ## Note
12
- this is a WIP and any contributions are welcome
13
-
14
-
15
  # how to load the model
16
  ```python
17
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
@@ -25,9 +21,20 @@ model = AutoModelForSequenceClassification.from_pretrained("tunis-ai/TunBERT",tr
25
  ```python
26
  text = "[insert text here]"
27
  inputs = tokenizer(text,return_tensors='pt')
 
 
 
 
 
 
28
  output = model(**inputs)
29
  ```
 
 
30
  or you can use the pipeline :
 
 
 
31
  ```python
32
  from transformers import pipeline
33
 
 
8
 
9
  This is a converted version of [Instadeep's](https://huggingface.co/InstaDeepAI) [TunBERT](https://github.com/instadeepai/tunbert/) from nemo to safetensors.
10
 
 
 
 
 
11
  # how to load the model
12
  ```python
13
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
 
21
  ```python
22
  text = "[insert text here]"
23
  inputs = tokenizer(text,return_tensors='pt')
24
+ output = model.process(**inputs) # -> List["positive" or "negative"]
25
+ ```
26
+ or you can use the normal forward method (currently compatible with the Trainer class)
27
+ ```python
28
+ text = "[insert text here]"
29
+ inputs = tokenizer(text,return_tensors='pt')
30
  output = model(**inputs)
31
  ```
32
+
33
+
34
  or you can use the pipeline :
35
+
36
+ ⚠️currently broken try an older version of transformers until i raise this, in the mean time use the `model.process` method mentioned above
37
+
38
  ```python
39
  from transformers import pipeline
40