GUI: upload, live progress + ETA, delete; report thinking; docs twg fix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
edb8ee3731
commit
cbe111bc34
+4
-1
@@ -126,6 +126,7 @@ def run(name, max_frames=60, scene=0.05):
|
||||
sd = d / "shots"
|
||||
sd.mkdir(exist_ok=True)
|
||||
for p in [*sd.glob("shot_*.jpg"), *sd.glob("view_*.jpg")]: p.unlink()
|
||||
db.tick(name, 0, 0, "estrazione dei fotogrammi dal video")
|
||||
kept = [] # (t, path, hash)
|
||||
bars = _bars(video, (db.connect().execute("SELECT duration_s FROM recordings WHERE name=?", (name,)).fetchone() or [0])[0] or 0)
|
||||
for t in _times(video, scene, bars):
|
||||
@@ -143,10 +144,12 @@ def run(name, max_frames=60, scene=0.05):
|
||||
if i not in keep: k[1].unlink()
|
||||
kept = [kept[i] for i in keep]
|
||||
|
||||
db.tick(name, 0, len(kept), "avvio del modello di visione")
|
||||
srv = llama.start(log=d / "llama.log") # None if already running
|
||||
rows = []
|
||||
try:
|
||||
for t, p, _ in kept:
|
||||
for i, (t, p, _) in enumerate(kept):
|
||||
db.tick(name, i, len(kept), f"schermata {i + 1} di {len(kept)} ({int(t) // 60:02d}:{int(t) % 60:02d})")
|
||||
r = read_shot(p); _augment(r)
|
||||
r["view"] = _view(p, r.pop("content_box", None))
|
||||
rows.append({"t": t, "file": p.name, **r}); print(f"{t:6.1f}s {r['kind']} {(r['title'] or '')[:60]}", flush=True)
|
||||
|
||||
Reference in New Issue
Block a user