tabito12345678910 commited on
Commit
df2aef5
·
1 Parent(s): 45c2088

Create new README.md with proper Hugging Face Spaces YAML configuration for Gohan API

Browse files
Files changed (1) hide show
  1. README.md +0 -34
README.md DELETED
@@ -1,34 +0,0 @@
1
- # Gohan FastAPI
2
-
3
- This is a FastAPI-based product recommendation API deployed on Hugging Face Spaces.
4
-
5
- ## Endpoints
6
-
7
- - `GET /` - Root endpoint with API information
8
- - `GET /status` - Health check and model status
9
- - `POST /predict` - Main prediction endpoint with topK parameter
10
- - `POST /predict_simple` - Simple prediction endpoint
11
-
12
- ## Usage
13
-
14
- ### Check API Status
15
- ```bash
16
- curl "https://your-space-url.hf.space/status"
17
- ```
18
-
19
- ### Make Predictions
20
- ```bash
21
- curl -X POST "https://your-space-url.hf.space/predict" \
22
- -H "Content-Type: application/json" \
23
- -d '{"company_data_json": "{...}", "topK": 10}'
24
- ```
25
-
26
- ## Model Loading
27
-
28
- The API uses FastAPI's lifespan events to load models only once during startup, providing efficient cold start handling.
29
-
30
- ## Required Model Files
31
-
32
- - `model/gohan/epoch_*.pt` (PyTorch model)
33
- - `model/gohan/*.json` (encoder files)
34
- - `model/gohan/gohan_pm.csv` (product master data)