drishti-api / README.md
arpy8's picture
docs: update README with new API endpoints and correct URL
3a47614
metadata
title: Drishti Backend API
emoji: 🌱
colorFrom: green
colorTo: yellow
sdk: docker
pinned: true

Backend API

This directory contains the source code for the backend API, built using FastAPI.

Endpoints

This API is hosted at https://arpy8-drishti-api.hf.space/. The API provides the following endpoints:

  • /predict: This endpoint takes an image in base64 format as input and returns the predicted disease type.
  • /update-data: Adds the data to the queue which will update the database later.
  • /fetch-news: Fetches the latest news from the news API.
  • /last-data: Fetches last n data logs from the database.

Setup

Using the provided Dockerfile, you can easily build and run the API container.

  1. Build the Docker image:
docker build -t backend-api .
  1. Run the Docker container:
docker run -p 7860:7860 backend-api
  1. Access the API at http://localhost:7860/predict.