How poornachandra35/multi-service-api-with-fastapi-go-machine-learning works
This is a FastAPI backend that exposes a central gateway and five capabilities: CSV exploration/cleaning, sentiment classification, animal-image classification, stock prediction, and number-series prediction, plus an HTML API guide. The user workflow is an HTTP request routed to a capability, validated or processed by its service/model, and returned as a response. The CSV workflow also keeps uploaded data in process-local sessions. The README documents the stock model artifacts and broad capabilities; those documented relationships are shown, while unsampled implementation details are not inferred.
Main entry points: main.py FastAPI gateway · api_guide.py API guide route · routes.py CSV endpoints · service.py CSV processing
Components 17
API gateway and guide
- FastAPI gateway
main.py - API guide route
guides/api_guide.py - HTML guide
templates/api_guide.html
CSV analysis
- CSV endpoints
modules/csv_analyzer/routes.py - CSV processing
modules/csv_analyzer/service.py - Data sessions
modules/csv_analyzer/session_store.py
ML prediction services
- Sentiment endpoints
modules/sentiment_analyzer/routes.py - Sentiment inference
modules/sentiment_analyzer/model_loader.py - Animal endpoint
modules/animal_classifier/routes.py - Image classifier
modules/animal_classifier/model_loader.py - Animal label map
modules/animal_classifier/labels_map.py - Stock endpoint
modules/stock_predictor/routes.py - Stock inference
modules/stock_predictor/model_loader.py - Stock model files
modules/stock_predictor/model
Series analysis
- Series endpoint
modules/series_analyzer/routes.py - Pattern prediction
modules/series_analyzer/service.py
Other components
- API client
Connections 16
- API client → FastAPI gateway: sends requests
README.md - FastAPI gateway → CSV endpoints: registers routes
main.py - FastAPI gateway → Sentiment endpoints: registers routes
main.py - FastAPI gateway → Animal endpoint: registers routes
main.py - FastAPI gateway → Stock endpoint: registers routes
main.py - FastAPI gateway → Series endpoint: registers routes
main.py - FastAPI gateway → API guide route: registers route
main.py - API guide route → HTML guide: renders template
guides/api_guide.py - CSV endpoints → CSV processing: calls processing
modules/csv_analyzer/routes.py - CSV processing → Data sessions: reads and writes
modules/csv_analyzer/service.py - Sentiment endpoints → Sentiment inference: calls inference
modules/sentiment_analyzer/routes.py - Animal endpoint → Image classifier: calls inference
modules/animal_classifier/routes.py - Image classifier → Animal label map: maps labels
modules/animal_classifier/model_loader.py - Stock endpoint → Stock inference: calls prediction
modules/stock_predictor/routes.py - Stock inference → Stock model files: uses model files
README.md - Series endpoint → Pattern prediction: calls prediction
modules/series_analyzer/routes.py