--- title: Ottema StructFix Demo emoji: 🔧 colorFrom: green colorTo: yellow sdk: gradio app_file: app.py pinned: true license: apache-2.0 --- # Ottema StructFix Demo Repair broken JSON / tool-call output against a typed schema. Model: `ottema/structfix-codet5p-220m` (220M params, Apache-2.0). ## Use cases - LLM emits invalid JSON → fix it - Missing required fields → fill or flag - Wrong enum values → coerce to valid - Markdown-wrapped output → strip the wrapper - Partial / truncated JSON → complete it - Schema-constrained generation recovery ## How it works The user provides a DSL schema (typed fields with enums and required flags) and a broken output. The model returns a valid JSON object that matches the schema. ## Credits - [CodeT5+](https://github.com/salesforce/CodeT5) backbone (Apache-2.0) - Fine-tuning and dataset by [Ottema](https://huggingface.co/ottema) ## Related - [Collection: Ottema Open Models](https://huggingface.co/collections/ottema/ottema/ottema-open-models-6a3600e6cc0bdc9c01dd68c8) - [Dataset: structfix-bench](https://huggingface.co/datasets/ottema/structfix-bench)