feat: add minimal Gradio web UI (app.py)

Single-page form wrapping src.generate.generate_period: pick model, mode,
key, style, function, time, sampling params and optional prefix; returns
the chord grid plus downloadable .chord and .mid files. Russian usage
instructions are embedded on the same page.

Auto-length output is capped at 16 bars (the period maximum) so a model
that never emits EOS can't run away into dozens of NC/hold bars.

Added per the author's explicit request — web UI was previously out of
scope; updated CLAUDE.md and README accordingly. Choices for style/
function/time are derived from VOCAB so the form can't drift from the
tokenizer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 15:38:01 +03:00
parent f00a6c1b3a
commit c147c47acb
4 changed files with 353 additions and 4 deletions
+3
View File
@@ -12,5 +12,8 @@ mido==1.3.3
# Visualization
matplotlib==3.10.9
# Web UI (optional — only needed for app.py)
gradio==6.16.0
# Testing
pytest==9.0.3