helenai commited on
Commit
f7bdc0e
1 Parent(s): e84952a

Update README

Browse files
Files changed (1) hide show
  1. README.md +13 -3
README.md CHANGED
@@ -16,6 +16,16 @@ tags:
16
 
17
  ## Usage example
18
 
 
 
 
 
 
 
 
 
 
 
19
  You can use this model with Transformers *pipeline*.
20
 
21
  ```python
@@ -26,13 +36,13 @@ model_id = "helenai/distilbert-base-uncased-finetuned-sst-2-english-ov-int8"
26
  model = OVModelForSequenceClassification.from_pretrained(model_id)
27
  tokenizer = AutoTokenizer.from_pretrained(model_id)
28
  cls_pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
29
- text = "He's a dreadful magician."
30
  outputs = cls_pipe(text)
31
  print(outputs)
32
  ```
33
 
34
  Example output:
35
 
36
- ```bash
37
- [{'label': 'NEGATIVE', 'score': 0.9929909706115723}]
38
  ```
 
16
 
17
  ## Usage example
18
 
19
+ To install the requirements for using the OpenVINO backend, do:
20
+
21
+ ```
22
+ pip install git+https://github.com/huggingface/optimum-intel.git#egg=optimum-intel[openvino]
23
+ ```
24
+
25
+ This installs all necessary dependencies, including Transformers and OpenVINO.
26
+
27
+ *NOTE: Python 3.7-3.9 are supported. A virtualenv is recommended.*
28
+
29
  You can use this model with Transformers *pipeline*.
30
 
31
  ```python
 
36
  model = OVModelForSequenceClassification.from_pretrained(model_id)
37
  tokenizer = AutoTokenizer.from_pretrained(model_id)
38
  cls_pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
39
+ text = "OpenVINO is awesome!"
40
  outputs = cls_pipe(text)
41
  print(outputs)
42
  ```
43
 
44
  Example output:
45
 
46
+ ```sh
47
+ [{'label': 'POSITIVE', 'score': 0.9998594522476196}]
48
  ```