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

A newer version of the Gradio SDK is available: 6.19.0

Upgrade
metadata
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+ backbone (Apache-2.0)
  • Fine-tuning and dataset by Ottema

Related