structfix-demo / README.md
luis-otte's picture
Space README
7c9ecef verified
|
Raw
History Blame Contribute Delete
1.12 kB
---
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)