Spaces:
Sleeping
Sleeping
File size: 965 Bytes
8f4cb99 2b66ffc 8f4cb99 2b66ffc 8f4cb99 0f4d874 3a47614 0f4d874 3a47614 0f4d874 3a47614 0f4d874 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
---
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/](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:
```bash
docker build -t backend-api .
```
2. Run the Docker container:
```bash
docker run -p 7860:7860 backend-api
```
3. Access the API at `http://localhost:7860/predict`.
|