Spaces:
Runtime error
Runtime error
mwitiderrick
commited on
Commit
•
321fc5f
1
Parent(s):
d719c99
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,7 @@ Here is sample code for a text classification pipeline:
|
|
16 |
```
|
17 |
from deepsparse import Pipeline
|
18 |
pipeline = Pipeline.create(task="zero_shot_text_classification", model_path="zoo:nlp/text_classification/distilbert-none/pytorch/huggingface/mnli/pruned80_quant-none-vnni",model_scheme="mnli",model_config={"hypothesis_template": "This text is related to {}"},)
|
|
|
19 |
inference = pipeline(sequences= text,labels=['politics', 'public health', 'Europe'],)
|
20 |
print(inference)
|
21 |
```
|
|
|
16 |
```
|
17 |
from deepsparse import Pipeline
|
18 |
pipeline = Pipeline.create(task="zero_shot_text_classification", model_path="zoo:nlp/text_classification/distilbert-none/pytorch/huggingface/mnli/pruned80_quant-none-vnni",model_scheme="mnli",model_config={"hypothesis_template": "This text is related to {}"},)
|
19 |
+
text = "The senate passed 3 laws today"
|
20 |
inference = pipeline(sequences= text,labels=['politics', 'public health', 'Europe'],)
|
21 |
print(inference)
|
22 |
```
|