feat: full system update — cockpit, local-first extraction, self-learning, self-update
- cockpit/ UI (FastAPI): live agent switching, sequential chat, Femida goddess voice, Apple aesthetics, generic Themis branding - extraction: Apple Vision OCR + markitdown + whisper, mixed-PDF, requisites sidecar, adaptive OCR (Ollama removed) - self-learning: redline (baseline diff → knowledge/redlines.md) + error analysis - /themis-update skill: pull latest logic from GitHub without touching cases/ or knowledge/ - portable paths (THEMIS_HOME env), bundled vision-ocr.swift built by install.sh - comprehensive install.sh, README with screenshot, LICENSE (MIT), CONTRIBUTING - synthetic example case (ivanov-ivan); zero client data
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import Foundation
|
||||
import Vision
|
||||
import AppKit
|
||||
|
||||
let args = CommandLine.arguments
|
||||
guard args.count > 1, let img = NSImage(contentsOfFile: args[1]),
|
||||
let cg = img.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
|
||||
FileHandle.standardError.write("load fail\n".data(using:.utf8)!); exit(1)
|
||||
}
|
||||
let req = VNRecognizeTextRequest { r, _ in
|
||||
guard let obs = r.results as? [VNRecognizedTextObservation] else { return }
|
||||
for o in obs { if let t = o.topCandidates(1).first { print(t.string) } }
|
||||
}
|
||||
req.recognitionLevel = .accurate
|
||||
req.recognitionLanguages = ["ru-RU","en-US"]
|
||||
req.usesLanguageCorrection = true
|
||||
try? VNImageRequestHandler(cgImage: cg, options: [:]).perform([req])
|
||||
Reference in New Issue
Block a user