Instructions to use Group209/Sentiment_Analysis with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Group209/Sentiment_Analysis with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Group209/Sentiment_Analysis")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Group209/Sentiment_Analysis", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
27c5f6a
1
Parent(s): 70adb73
Update Sentiment_analysis_with_bert.py
Browse files
Sentiment_analysis_with_bert.py
CHANGED
|
@@ -518,4 +518,10 @@ def generate_improved_text(review_text, predicted_sentiment):
|
|
| 518 |
else:
|
| 519 |
improved_text = review_text
|
| 520 |
|
| 521 |
-
return improved_text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 518 |
else:
|
| 519 |
improved_text = review_text
|
| 520 |
|
| 521 |
+
return improved_text
|
| 522 |
+
|
| 523 |
+
from transformers import BertModel
|
| 524 |
+
|
| 525 |
+
bert_model = BertModel.from_pretrained('bert-base-uncased')
|
| 526 |
+
|
| 527 |
+
bert_model.save_pretrained('C:/Users/Marie-Ange/Downloads')
|