UNPKG

gliner-node-wrapper

Version:

Node.js wrapper around Python-based GlinER NER library

16 lines (12 loc) 529 B
const { execSync } = require('child_process'); try { console.log('Checking for Python...'); execSync('python3 --version', { stdio: 'inherit' }); console.log('Installing Python dependencies...'); execSync('python3 -m pip install --upgrade pip', { stdio: 'inherit' }); execSync('python3 -m pip install -r requirements.txt', { stdio: 'inherit' }); console.log('Python dependencies installed successfully.'); } catch (err) { console.error('Failed to install Python dependencies:', err.message); process.exit(1); }