Computer vision app with Gluon (MXNet) backend via FastAPI, React frontend (default), and optional Vue frontend.
-
Backend:
- cd backend
- pip install -r requirements.txt
- uvicorn main:app --reload # Run on http://localhost:8000
-
Frontend (React - Default):
- cd frontend-react
- npm install
- npm start # Runs on http://localhost:3000, proxies to backend
To switch to Vue:
- Comment out React serve in scripts.
- cd frontend-vue
- npm install
- npm run serve # Runs on http://localhost:8080
-
Training:
- POST to /train with JSON {"from_scratch": true/false}
- Model saves to backend/saved_models/model.params
-
Inference:
- POST to /predict with form-data file="image"
-
Notes:
- Vue is disabled by default; enable by running its serve command instead of React.
- For production, use nginx to serve frontends and proxy to backend.
- Git init and commit as needed.