File size: 1,177 Bytes
1624b73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: SATCAP-OCEANS Backend
emoji: 🚀
colorFrom: blue
colorTo: gray
sdk: docker
app_port: 7860
pinned: false
license: mit
---

# SATCAP-OCEANS Backend (API)

Ce dépôt contient le backend Django du projet SATCAP-OCEANS, configuré pour être déployé sur Hugging Face Spaces via Docker.

## Configuration pour Hugging Face

Le backend a été modifié pour fonctionner dans un environnement Docker sur Hugging Face :
- **Port** : L'application écoute sur le port `7860` (requis par Hugging Face).
- **Base de données** : Utilise SQLite par défaut pour la portabilité.
- **Dockerfile** : Inclus pour l'installation automatique des dépendances système (OpenCV, etc.) et Python.

## Utilisation de l'API

Une fois déployé, vous pouvez accéder à l'API via l'URL de votre Space.

### Endpoints principaux :
- `POST /api/detect/` : Envoyer une image pour détection.
- `GET /api/history/` : Récupérer l'historique des détections.

## Déploiement

Pour mettre à jour ce Space :
1. Ajoutez ce dépôt comme remote : `git remote add hf_docker https://huggingface.co/spaces/CosmoLABHub/SATCAP-OCEANS_DOCKER`
2. Poussez les changements : `git push hf_docker main`