**feat(brainy-models): enhance workflows, update README, and improve model compatibility**

- **Scripts**:
  - Refactored logging within `release-workflow.js` for improved readability and maintainability.
  - Added a fallback mechanism in `download-full-models.js` to inject the "format" field into `model.json` for TensorFlow.js compatibility.

- **Documentation**:
  - Updated `README.md` with a redesigned structure:
    - Enhanced readability using emojis and a cleaner presentation.
    - Expanded `Overview`, `Features`, and `Quick Start` sections.
    - Refined "Use Cases" and added better explanations for bundled model benefits.

- **Models**:
  - Adjusted `model.json` to include the "format" field for compatibility with TensorFlow.js.
  - Updated `metadata.json` with a recent download timestamp.

**Purpose
This commit is contained in:
David Snelling 2025-08-01 17:33:13 -07:00
parent 92e2f017d5
commit a8a95a84f4
5 changed files with 71 additions and 35 deletions

View file

@ -138,6 +138,13 @@ async function downloadFullModel() {
// Read the model.json to get the weights manifest
const modelJson = JSON.parse(fs.readFileSync(modelJsonPath, 'utf8'))
// Add the required "format" field for TensorFlow.js compatibility
if (!modelJson.format) {
modelJson.format = 'tfjs-graph-model'
fs.writeFileSync(modelJsonPath, JSON.stringify(modelJson, null, 2))
console.log('✅ Added "format" field to model.json for TensorFlow.js compatibility')
}
// Download all weight files
if (modelJson.weightsManifest) {
for (const manifest of modelJson.weightsManifest) {