Spaces:
Sleeping
Sleeping
|
Download README.md from Riceunjae/Project_TPA_AI: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/spaces/Riceunjae/Project_TPA_AI/resolve/main/README.md
- Command line
-
hf download hf://spaces/Riceunjae/Project_TPA_AI/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Riceunjae/Project_TPA_AI/resolve/main/README.md
1.37 kB
| title: Daurin AI Hub | |
| emoji: ♻️ | |
| colorFrom: green | |
| colorTo: blue | |
| sdk: docker | |
| sdk_version: 5.4.0 | |
| app_file: main.py | |
| pinned: false | |
| # Daurin AI Hub | |
| ## Fitur | |
| - `FastAPI` untuk API inference model. | |
| - Endpoint prediksi untuk CNN, K-Means, dan regresi. | |
| - Dokumen otomatis di `/docs`. | |
| - Health check di `/health`. | |
| - Siap dijalankan dengan Docker. | |
| ## Menjalankan Lokal | |
| ```bash | |
| pip install -r requirements.txt | |
| uvicorn main:app --reload | |
| ``` | |
| Buka: | |
| - API: `http://127.0.0.1:8000` | |
| - Swagger: `http://127.0.0.1:8000/docs` | |
| ## Endpoint | |
| - `GET /` - status layanan. | |
| - `GET /health` - status readiness model. | |
| - `POST /predict-cnn` - prediksi gambar sampah. | |
| - `POST /predict-kmeans` - clustering data TPA. | |
| - `POST /predict-regression` - prediksi metana. | |
| ## Deploy ke HuggingFace Spaces | |
| 1. Buat Space baru. | |
| 2. Pilih `Docker` sebagai SDK. | |
| 3. Upload seluruh isi repository ini. | |
| 4. HuggingFace akan membaca `Dockerfile` dan menjalankan aplikasi pada port `7860`. | |
| ## Deploy ke Render | |
| 1. Buat Web Service baru dari repository ini. | |
| 2. Pilih environment `Docker`. | |
| 3. Render akan memakai `Dockerfile` dan membaca port dari env `PORT`. | |
| 4. Gunakan health check path `/health`. | |
| ## Deploy ke VPS | |
| ```bash | |
| docker build -t daurin-ai-hub . | |
| docker run -p 8000:8000 -e PORT=8000 daurin-ai-hub | |
| ``` | |
| Kalau tidak memakai Docker, jalankan: | |
| ```bash | |
| uvicorn main:app --host 0.0.0.0 --port 8000 | |
| ``` |