Browser UI (Streamlit) for Language Detector FastAPI — calls /health and /detect over HTTPS.
79
Streamlit browser UI that calls a deployed FastAPI Language Detector API (/health, /detect) over HTTPS (httpx).
It does not contain the sklearn model or inference stack. For inference use mateo755/language-detector-api.
docker run --rm -p 8501:8501 \
-e LANGUAGE_DETECTOR_API_URL=https://your-api-host.example.com \
mateo755/language-detector-streamlit:v1
Open http://localhost:8501 in your browser.
-p host:container must match PORT if you override it — e.g. -e PORT=9000 -p 9000:9000)./_stcore/health (used by the image HEALTHCHECK).Inside the container, 127.0.0.1 is loopback in the container, not your laptop. Either set LANGUAGE_DETECTOR_API_URL to a public API URL, or reach FastAPI on the host via http://host.docker.internal:<port> (Docker Desktop), or use --add-host=host.docker.internal:host-gateway on Linux Docker.
| Variable | Description |
|---|---|
LANGUAGE_DETECTOR_API_URL | Recommended for deployed UI. Base URL of the FastAPI service (scheme + host, no /detect suffix). Pre-fills Remote mode. Trailing / is acceptable. |
LANGUAGE_DETECTOR_LOCAL_API_URL | Optional override for Local (localhost) in the app (http://127.0.0.1:8000 default). Rarely useful for cloud-hosted Streamlit. |
PORT | Listen port inside the container; platforms such as Render set this. Default 8501 when unset (Dockerfile). |
mateo755/language-detector-api — FastAPI service with bundled .pkl model (/detect, /health, /docs).Content type
Image
Digest
sha256:aa24a28aa…
Size
167.7 MB
Last updated
6 months ago
docker pull mateo755/language-detector-streamlit:v1