Skip to content

A Django Rest Framework API, that have machine learning backend like OCR (converting images to text) and KNN Algorithm trained on IRIS dataset to predict the "flower".

Notifications You must be signed in to change notification settings

AhmedAli288/OCR_and_Knn_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCR & KNN algorithm API

Pre-requisites

  1. Install Python

    sudo apt install python3
  2. Install virtual environment utility

    sudo apt install python3-venv
  3. Create a virtual environment

     python3 -m venv venv
  4. Setup an environment and run project (Activate virtual environment and install requirements and run development server)

    source .env

How to test OCR

  1. To test OCR use postman and run the python server by following command "python manage.py runserver".
  2. After running server use URL "127.0.0.1:8000/api/ocr/" on the postman.
  3. Set the postman setting to "POST", "Body", "binary" and pass an image having text in it.
  4. The image is converted into the text.

How to test KNN

  1. To test KNN use postman and run the python server by following command "python manage.py runserver".
  2. After running server use URL "127.0.0.1:8000/api/iris/" on the postman.
  3. Set the postman setting to "POST", "Body", "raw" & format "json".
  4. Now pass values like following: { "SL": your_value, "SW": your_value, "PL": your_value, "PW": your_value }
  5. Now send and see the results.

About

A Django Rest Framework API, that have machine learning backend like OCR (converting images to text) and KNN Algorithm trained on IRIS dataset to predict the "flower".

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages