rinogeek's picture
Initial Docker configuration for Hugging Face
1624b73
---
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`