@@ -55,7 +55,6 @@ import textpredict as tp
55
55
56
56
model = tp.initialize(task = " sentiment" )
57
57
result = model.analyze(text = [" I love this product!" , " I hate this product!" ], return_probs = False )
58
- print (f " Sentiment Prediction Result: { result} " )
59
58
```
60
59
61
60
### Using Pre-trained Models from Hugging Face
@@ -65,7 +64,6 @@ Utilize a specific pre-trained model from Hugging Face:
65
64
``` python
66
65
model = tp.initialize(task = " emotion" , model_name = " AnkitAI/reviews-roberta-base-sentiment-analysis" , source = " huggingface" )
67
66
result = model.analyze(text = " I love this product!" , return_probs = True )
68
- print (f " Sentiment Prediction Result: { result} " )
69
67
```
70
68
71
69
### Using Models from Local Directory
@@ -75,7 +73,6 @@ Load and use a model from a local directory:
75
73
``` python
76
74
model = tp.initialize(task = " ner" , model_name = " ./results" , source = " local" )
77
75
result = model.analyze(text = " I love this product!" , return_probs = True )
78
- print (f " Sentiment Prediction Result: { result} " )
79
76
```
80
77
81
78
### Training a Model
@@ -97,7 +94,6 @@ trainer.train()
97
94
# Save and evaluate the trained model
98
95
trainer.save()
99
96
metrics = trainer.evaluate(test_dataset = val_data)
100
- print (f " Evaluation Metrics: { metrics} " )
101
97
```
102
98
103
99
For detailed examples, refer to the ` examples ` directory.
@@ -110,12 +106,11 @@ Understand model predictions with feature importance:
110
106
text = " I love this product!"
111
107
explainer = tp.Explainability(model_name = " bert-base-uncased" , task = " sentiment" , device = " cpu" )
112
108
importance = explainer.feature_importance(text = text)
113
- print (f " Feature Importance: { importance} " )
114
109
```
115
110
116
111
## Documentation
117
112
118
- For detailed documentation, please refer to the [ TextPredict Documentation] ( # ) .
113
+ For detailed documentation, please refer to the [ TextPredict Documentation] ( https://ankit-aglawe.github.io/textpredict/ ) .
119
114
120
115
## Contributing
121
116
@@ -125,6 +120,11 @@ Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTIN
125
120
126
121
This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details.
127
122
123
+ ## Credits
124
+
125
+ This project leverages the [ Transformers] ( https://github.com/huggingface/transformers ) library by Hugging Face. We extend our gratitude to the Hugging Face team and to the developers, contributors for their work for their work in creating and maintaining such a valuable resource for the NLP community.
126
+
127
+
128
128
### Links
129
129
130
130
- ** GitHub Repository** : [ Github] ( https://github.com/ankit-aglawe/textpredict )
@@ -133,3 +133,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
133
133
- ** Source Code** : [ Source Code] ( https://github.com/ankit-aglawe/sentimentpredictor )
134
134
- ** Issue Tracker** : [ Issue Tracker] ( https://github.com/ankit-aglawe/sentimentpredictor/issues )
135
135
136
+
0 commit comments