MCPcopy Create free account
hub / github.com/GitsSaikat/PyGen / __init__

Method __init__

data/AutoVison/context_code.py:12–21  ·  view source on GitHub ↗

Initialize AutoVision with optional pre-trained model

(self, model_path=None)

Source from the content-addressed store, hash-verified

10
11class AutoVision:
12 def __init__(self, model_path=None):
13 """Initialize AutoVision with optional pre-trained model"""
14 self.model = None
15 self.feature_extractors = {}
16 self.classes = []
17
18 # Get absolute path for model files
19 if model_path:
20 self.model_path = self._get_resource_path(model_path)
21 self.load_model(self.model_path)
22
23 def _get_resource_path(self, relative_path):
24 """Get absolute path to resource, works for dev and PyInstaller"""

Callers

nothing calls this directly

Calls 2

_get_resource_pathMethod · 0.95
load_modelMethod · 0.95

Tested by

no test coverage detected