--- title: English Hindi Translator emoji: 🌐 colorFrom: blue colorTo: green sdk: docker app_port: 7860 pinned: false license: mit --- # English to Hindi Translator A FastAPI demo that serves a custom Transformer translation model with a simple web interface. `train.py` is included for reference. The deployed Docker app does not run training; it only loads the saved checkpoint for inference. ## Try it locally ```bash pip install -r requirements.txt uvicorn app:app --host 0.0.0.0 --port 7860 ``` Then open `http://localhost:7860`. ## API ```bash curl -X POST "http://localhost:7860/translate" \ -H "Content-Type: application/json" \ -d '{"text":"How are you?"}' ``` Model parameter names, tensor shapes, and sizes are available in the Space UI with the **Model Parameters** button, or directly through: ```bash curl "http://localhost:7860/model-parameters" ```