Welcome to the Classification API, utilizing the InceptionV3 model for image recognition! 🌟 This API is built with TensorFlow 2.11.0, Python 3.8.0, and can be easily deployed using Docker Compose. Let's get started!
- Make sure you have Docker and Docker Compose installed on your system. You can download Docker here and Docker Compose here.
git clone https://github.com/Roytechworkforce/classificationapi.git
cd classificationapidocker-compose up --buildThe API will be accessible at http://localhost:3000.
- Endpoint:
/register - Method:
POST - Request:
- Form Data:
username: user name.password: password.
- Form Data:
- Endpoint:
/refill - Method:
POST - Request:
- Form Data:
username: user name.admin_pw: abc123.amount: 10
- Form Data:
- Endpoint:
/predict - Method:
POST - Request:
- Form Data:
image: image to url jpg/png (no base64)username: user name.password: password.
- Form Data:
import requests
import json
# Replace 'your-image-file.jpg' with the path to your image file
url = "localhost:3000/classify"
payload = json.dumps({
"username": "test",
"password": "secure",
"admin_pw": "abc123",
"url": "https://cdn.pixabay.com/photo/2018/04/13/21/24/lion-3317670_1280.jpg",
"amount": 4
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
# Print the result
print(json.loads(response.content))This API is powered by TensorFlow's InceptionV3 model. Special thanks to the TensorFlow team for providing this amazing resource.
If you'd like to contribute, please fork the repository and create a pull request. Feel free to open issues for feature requests, bug reports, or general feedback.
Happy coding! 🚀🔍📷