File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 3535
3636import sqlite_vec
3737from sqlite_vec import serialize_float32
38+ import os
39+
40+ def resource_path (relative_path ):
41+ """Get absolute path to resource, works for dev and PyInstaller"""
42+ if hasattr (sys , "_MEIPASS" ):
43+ return os .path .join (sys ._MEIPASS , relative_path )
44+ return os .path .join (os .path .abspath ("." ), relative_path )
45+
3846
3947# -----------------------------
4048# Configuration Management
@@ -166,7 +174,7 @@ def _positional_params(fn):
166174 if on_status :
167175 on_status (msg )
168176
169- model = YOLO (CFG ["model_path" ])
177+ model = YOLO (resource_path ( CFG ["model_path" ]) )
170178
171179 embedder = None
172180 conn = None
@@ -192,6 +200,11 @@ def _positional_params(fn):
192200 total = len (images )
193201
194202 for idx , img_path in enumerate (images , start = 1 ):
203+ msg = f"Processing File: { img_path .name } ({ idx } /{ total } )"
204+ banner (msg )
205+ if on_status :
206+ on_status (msg )
207+
195208 if on_progress :
196209 on_progress (idx , total )
197210
You can’t perform that action at this time.
0 commit comments