phlippseitz commited on
Commit
4ea0ade
1 Parent(s): 3a4dcae

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -9,18 +9,18 @@ datasets:
9
  - narrativeqa
10
  ---
11
 
12
- # ONNX export of Adapter `hSterz/narrativeqa` for facebook/bart-base
13
  ## Conversion of [AdapterHub/narrativeqa](https://huggingface.co/AdapterHub/narrativeqa) for UKP SQuARE
14
 
15
 
16
  ## Usage
17
  ```python
18
- onnx_path = hf_hub_download(repo_id='UKP-SQuARE/narrativeqa-onnx', filename='model.onnx') # or model_quant.onnx for quantization
19
  onnx_model = InferenceSession(onnx_path, providers=['CPUExecutionProvider'])
20
 
21
  context = 'ONNX is an open format to represent models. The benefits of using ONNX include interoperability of frameworks and hardware optimization.'
22
  question = 'What are advantages of ONNX?'
23
- tokenizer = AutoTokenizer.from_pretrained('UKP-SQuARE/narrativeqa-onnx')
24
 
25
  inputs = tokenizer(question, context, padding=True, truncation=True, return_tensors='np')
26
  outputs = onnx_model.run(input_feed=dict(inputs), output_names=None)
 
9
  - narrativeqa
10
  ---
11
 
12
+ # ONNX export of Adapter `AdapterHub/narrativeqa` for facebook/bart-base
13
  ## Conversion of [AdapterHub/narrativeqa](https://huggingface.co/AdapterHub/narrativeqa) for UKP SQuARE
14
 
15
 
16
  ## Usage
17
  ```python
18
+ onnx_path = hf_hub_download(repo_id='UKP-SQuARE/bart-base-pf-narrativeqa-onnx', filename='model.onnx') # or model_quant.onnx for quantization
19
  onnx_model = InferenceSession(onnx_path, providers=['CPUExecutionProvider'])
20
 
21
  context = 'ONNX is an open format to represent models. The benefits of using ONNX include interoperability of frameworks and hardware optimization.'
22
  question = 'What are advantages of ONNX?'
23
+ tokenizer = AutoTokenizer.from_pretrained('UKP-SQuARE/bart-base-pf-narrativeqa-onnx')
24
 
25
  inputs = tokenizer(question, context, padding=True, truncation=True, return_tensors='np')
26
  outputs = onnx_model.run(input_feed=dict(inputs), output_names=None)