Spaces:
Runtime error
Runtime error
mwitiderrick
commited on
Commit
•
7c94f23
1
Parent(s):
2792048
Update app.py
Browse files
app.py
CHANGED
@@ -7,19 +7,19 @@ markdownn = '''
|
|
7 |
Sentiment Analysis determines whether a certain sentence is positive or negative.
|
8 |
![Sentiment](https://huggingface.co/spaces/neuralmagic/nlp-sentiment-analysis/resolve/main/class.png)
|
9 |
### What is Deepsparse?
|
10 |
-
DeepSparse is
|
11 |
-
|
12 |
|
13 |
SparseML Sentiment Analysis Pipelines integrate with Hugging Face’s Transformers library to enable the sparsification of a large set of transformers models.
|
14 |
|
15 |
The Sentiment Analysis Pipeline has pre-trained models and pre-processing, enabling you to pass raw text to the model.
|
16 |
|
17 |
-
##
|
18 |
An example use case for sentiment analysis is classifying the sentiment of customer reviews.
|
19 |
|
20 |
Customer review classification is crucial for customer-facing enterprises across industries such as retail, entertainment, food, and beverage. Knowing what your customers say about your product or solution can help you quickly address negative customer reviews and in turn reduce churn, providing a better customer experience.
|
21 |
|
22 |
-
#### Inference
|
23 |
Here is sample code for a sentiment analysis pipeline:
|
24 |
```python
|
25 |
from deepsparse import Pipeline
|
@@ -27,8 +27,7 @@ pipeline = Pipeline.create(task="sentiment-analysis", model_path="zoo:nlp/sentim
|
|
27 |
inference = pipeline(text)
|
28 |
print(inference)
|
29 |
```
|
30 |
-
|
31 |
-
[Accelerate Customer Review Classification with Sparse Transformers](https://neuralmagic.com/blog/accelerate-customer-review-classification-with-sparse-transformers/)
|
32 |
|
33 |
'''
|
34 |
task = "sentiment-analysis"
|
|
|
7 |
Sentiment Analysis determines whether a certain sentence is positive or negative.
|
8 |
![Sentiment](https://huggingface.co/spaces/neuralmagic/nlp-sentiment-analysis/resolve/main/class.png)
|
9 |
### What is Deepsparse?
|
10 |
+
DeepSparse is an inference runtime offering GPU-class performance on CPUs and APIs to integrate ML into your application. Sparsification is a powerful technique for optimizing models for inference, reducing the compute needed with a limited accuracy tradeoff. DeepSparse is designed to take advantage of model sparsity, enabling you to deploy models with the flexibility and scalability of software on commodity CPUs with the best-in-class performance of hardware accelerators, enabling you to standardize operations and reduce infrastructure costs.
|
11 |
+
Similar to Hugging Face, DeepSparse provides off-the-shelf pipelines for computer vision and NLP that wrap the model with proper pre- and post-processing to run performantly on CPUs by using sparse models.
|
12 |
|
13 |
SparseML Sentiment Analysis Pipelines integrate with Hugging Face’s Transformers library to enable the sparsification of a large set of transformers models.
|
14 |
|
15 |
The Sentiment Analysis Pipeline has pre-trained models and pre-processing, enabling you to pass raw text to the model.
|
16 |
|
17 |
+
## Use Case Description
|
18 |
An example use case for sentiment analysis is classifying the sentiment of customer reviews.
|
19 |
|
20 |
Customer review classification is crucial for customer-facing enterprises across industries such as retail, entertainment, food, and beverage. Knowing what your customers say about your product or solution can help you quickly address negative customer reviews and in turn reduce churn, providing a better customer experience.
|
21 |
|
22 |
+
#### Inference API Example
|
23 |
Here is sample code for a sentiment analysis pipeline:
|
24 |
```python
|
25 |
from deepsparse import Pipeline
|
|
|
27 |
inference = pipeline(text)
|
28 |
print(inference)
|
29 |
```
|
30 |
+
[Want to train a sparse model on your data? Checkout the documentation on sparse transfer learning](https://docs.neuralmagic.com/use-cases/natural-language-processing/text-classification)
|
|
|
31 |
|
32 |
'''
|
33 |
task = "sentiment-analysis"
|