Skip to content

This repository contains a Flask web application that acts as a unified interface for two different machine learning models—one for predicting decimal digits and another for predicting Devanagari characters. The app allows users to upload an image file, select the model type ('decimal' or 'devanagari'), and receive predictions.

Notifications You must be signed in to change notification settings

Bit-Nest/UnifiedDigit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unified Prediction Flask Application

This repository contains a Flask-based web application that allows users to upload images and get predictions from two different machine learning models:

  • Decimal Prediction Model: Recognizes decimal digits.
  • Devanagari Prediction Model: Recognizes Devanagari characters.

The app acts as a unified interface to interact with these models, forwarding image uploads to the respective model backend services, receiving predictions, and displaying the results.

Features

  • Upload an image and get predictions from either the Decimal or Devanagari model.
  • Provides both a web interface and API endpoints for ease of integration.
  • Can be used as an API for programmatic access, such as with Postman or curl.
  • Supports both image file and model type as inputs.

Setup and Installation

Prerequisites

  • Python 3.x
  • Flask
  • Requests library

1. Clone the Repository

git clone https://github.com/Bit-Nest/UnifiedDigit.git
cd UnifiedDigit
  1. Install Dependencies Ensure you have the required Python packages installed by running:
pip install -r requirements.txt
  1. Backend Models The app forwards image requests to two separate API endpoints:

Decimal Model: Running on http://localhost:5100 Devanagari Model: Running on http://localhost:5200

Make sure you have the backend services running on these respective ports before starting the Flask app.

  1. Start the Flask Application To run the Flask application:
python app.py

By default, the app will be hosted at http://localhost:5300.

  1. Testing the API You can use an API client like Postman or curl to test the predictions.

Example Request (POST) Endpoint: http://localhost:5300/predict

Parameters:

image (form-data): The image file to be analyzed.
model_type (form-data): Either decimal or devanagari.

About

This repository contains a Flask web application that acts as a unified interface for two different machine learning models—one for predicting decimal digits and another for predicting Devanagari characters. The app allows users to upload an image file, select the model type ('decimal' or 'devanagari'), and receive predictions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published