Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Spam-Detector-AI is a Python package for detecting and filtering spam messages u
package integrates with Django or any other project that uses python and offers three different classifiers: Naive
Bayes, Random Forest, and Support Vector Machine (SVM).

:warning: **Warning**: No significant breaking changes were added to the version 2.x.x in terms of usage. :warning:

## Table of Contents

- [Installation](#installation)
Expand Down Expand Up @@ -217,7 +219,7 @@ The API is built with Django, and the following is an example of how I use it in

![Screenshot](./screenshots/spam-detection-api-example.png)

The code:
The code:

```python
import requests
Expand All @@ -236,15 +238,15 @@ def check_website_contact_form(request):
"https://spam-detection-api.adamspierredavid.com/v1/check-spam/",
json={'message': message_with_subject} # Use json parameter instead of data
)

is_spam = False

# Check if the API request was successful
if response.status_code == 200:
# Parse the JSON response
json_response = response.json()
is_spam = json_response.get('is_spam')

if is_spam:
# Do something
pass
Expand Down
4 changes: 2 additions & 2 deletions spam_detector_ai/__info__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
__description__ = "Detecting and filtering spam messages using Machine Learning models."
__package_name__ = "spam-detector-ai"
__url__ = "https://github.com/adamspd/spam-detection-project"
__version__ = "1.0.3"
__test_version__ = True
__version__ = "2.0.0"
__test_version__ = False