Spaces:
Running
Running
File size: 1,365 Bytes
850e007 27f26fd 850e007 3556c3a 850e007 27f26fd 9d76bba 27f26fd 9d76bba 27f26fd 2fdbfb0 27f26fd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ---
title: Sanskrit D3PM Paraphrase
emoji: "🕉️"
colorFrom: indigo
colorTo: blue
sdk: gradio
sdk_version: 5.23.3
app_file: app.py
pinned: false
---
# Sanskrit D3PM Gradio Space
This Space runs Roman/IAST Sanskrit to Devanagari generation.
## Model Source
Set these Space variables in **Settings → Variables and secrets**:
- `HF_CHECKPOINT_REPO` = `<your-username>/sanskrit-d3pm`
- `HF_CHECKPOINT_FILE` = `best_model.pt`
- `HF_CHECKPOINT_LABEL` = `main-model` (optional)
- `HF_DEFAULT_MODEL_TYPE` = `d3pm_cross_attention` or `d3pm_encoder_decoder`
- `HF_DEFAULT_INCLUDE_NEG` = `true` or `false`
- `HF_DEFAULT_NUM_STEPS` = checkpoint diffusion steps, for example `4`, `8`, `16`
The app will download checkpoint from your model repo and load it at runtime.
If the model repo contains `model_settings.json`, the Space will use it
automatically and these variables become optional overrides.
### Optional MLflow Tracking in Space
You can enable lightweight MLflow event logging for inference + task runs.
Set these optional variables in **Settings → Variables and secrets**:
- `MLFLOW_TRACKING_URI` (example: `file:/tmp/mlruns` or your remote tracking server URI)
- `MLFLOW_EXPERIMENT_NAME` (example: `hf-space-sanskrit-d3pm`)
If not set, the Space runs normally without MLflow.
## Local Dev
```bash
pip install -r requirements.txt
python app.py
```
|