mwitiderrick commited on
Commit
f11e0b8
1 Parent(s): 67d85a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -8,8 +8,13 @@ DeepSparse is sparsity-aware inference runtime offering GPU-class performance on
8
  The text classification Pipeline, for example, wraps an NLP model with the proper preprocessing and postprocessing pipelines, such as tokenization. Here is a sample code for a question-answering pipeline:
9
  ```
10
  from deepsparse import Pipeline
11
- pipeline = pipeline.create(task="text-classification", model_path="zoo:nlp/text_classification/bert-base_cased/pytorch/huggingface/mnli/pruned90_quant-none")
12
- inference = pipeline(text)
 
 
 
 
 
13
  print(inference)
14
  ```
15
  '''
 
8
  The text classification Pipeline, for example, wraps an NLP model with the proper preprocessing and postprocessing pipelines, such as tokenization. Here is a sample code for a question-answering pipeline:
9
  ```
10
  from deepsparse import Pipeline
11
+ pipeline = Pipeline.create(
12
+ task=task,
13
+ model_path="zoo:nlp/text_classification/distilbert-none/pytorch/huggingface/mnli/pruned80_quant-none-vnni",
14
+ model_scheme="mnli",
15
+ model_config={"hypothesis_template": "This text is related to {}"},
16
+ )
17
+ inference = pipeline(sequences= text,labels=['politics', 'public health', 'Europe'],)
18
  print(inference)
19
  ```
20
  '''