Sign inSign up

notsooshariff/spamwarden

By notsooshariff

•Updated about 3 years ago

A Spam Prediction API server created using Flask

Image
0

76

notsooshariff/spamwarden repository overview

⁠SpamWarden Docker Container

This Docker container provides a Mail/SMS Spam Detection Flask API powered by a pre-trained machine learning model. It encapsulates all the necessary components, including the Flask server, pre-trained model, and dependencies, to make it easy for you to run the spam detection API in a containerized environment.

⁠Usage

To use this Docker container, follow these steps:

⁠Step 1: Pull the Docker Image

Use the following command to pull the Docker image from Docker Hub:

docker pull notsooshariff/spamwarden
⁠Step 2: Run the Docker Container

Once the image is downloaded, you can run the Docker container using the following command:

docker run -p 5000:5000 notsooshariff/spamwarden

This command maps port 5000 from the container to port 5000 on your host machine. Adjust the port mapping as needed to match your desired configuration.

⁠Step 3: Access the API

The SpamWarden API is now running inside the Docker container and accessible at the following URL:

http://localhost:5000

You can make API requests to this URL to predict whether a given text is likely spam or not.

⁠Step 4: Sending API Requests

To send API requests for spam detection, use the /predict endpoint with a POST request, providing a JSON payload with the text data to be predicted. Here's an example using curl:

curl -X POST -H "Content-Type: application/json" -d '{"data": "Your text goes here. Is this a spam message?"}' http://localhost:5000/predict

The API will respond with a prediction result, where 1 indicates the text is likely spam, and 0 indicates it is not spam.

⁠Project Structure

Inside the Docker container, the project structure remains the same as described in the original README. The container includes the Flask application (app.py), pre-trained machine learning model (model.pkl), TF-IDF vectorizer (vectorizer.pkl), and all necessary dependencies.

⁠Contributions

Contributions to this Docker container or the underlying code are welcome! If you have ideas for improvements, bug fixes, or new features, please feel free to contribute by visiting the GitHub repository⁠ and submitting pull requests.

Thank you for using the SpamWarden Docker Container for Mail/SMS Spam Detection!

Tag summary

Content type

Image

Digest

sha256:aa706f53a…

Size

470.8 MB

Last updated

about 3 years ago

docker pull notsooshariff/spamwarden:1.0