adaptive-text

Overview

adaptive-text explores an alternative to the fixed-length article: instead of reading one version of a piece of writing, a reader dials it between summary and expanded detail, and adjusts its formality and reading level, on demand.

Why and how it was built

The idea was to test whether a single source text could serve a reader who wants the two-line version and a reader who wants the full explanation, without writing two separate pieces. It started as a fast Streamlit prototype built with Claude: one script mocks the transformations so the interaction and a mock unlock/wallet mechanic can be tried with no API key, and a second calls the OpenAI API for real, with local SQLite caching to avoid repeat costs. A separate static HTML page demonstrates just the resolution-slider interaction against fixed sample text. The code was generated iteratively rather than architected up front, which shows: the repo still carries its own generation scripts as scratch artifacts, and two parallel implementations of the same logic sit side by side. Worth knowing going in, if you’re reading the source rather than just trying it.

Key Features

  • A resolution slider: dial the same source text between summary and full detail
  • Adjustable formality and reading level on the same underlying content
  • A mock mode (no API key, fake wallet/unlock mechanic) and a real mode (OpenAI-backed, SQLite-cached) sharing the same interaction model

Status

A Streamlit prototype, not a hosted service — the mock demo needs a Python runtime, and the real version needs an OpenAI API key plus server-side state (a local SQLite wallet). Neither mode can be exported to a static client-side deploy. adaptive-text-demo/index.html is a standalone static page, but it only demonstrates the slider interaction against four hardcoded text variants — not the actual text transformation — so it isn’t linked below as “the tool.”