зеркало из
https://github.com/ssciwr/AMMICO.git
synced 2025-10-29 13:06:04 +02:00
refactor: remove duplicated close method
Этот коммит содержится в:
родитель
a832142c44
Коммит
f277e86b29
@ -97,7 +97,7 @@ class MultimodalSummaryModel:
|
||||
)
|
||||
self.model.eval()
|
||||
|
||||
def _close(self) -> None:
|
||||
def close(self) -> None:
|
||||
"""Free model resources (helpful in long-running processes)."""
|
||||
try:
|
||||
if self.model is not None:
|
||||
@ -120,7 +120,3 @@ class MultimodalSummaryModel:
|
||||
RuntimeWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
def close(self) -> None:
|
||||
"""Free model resources (helpful in long-running processes)."""
|
||||
self._close()
|
||||
|
||||
@ -1458,7 +1458,9 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"for key in image_dict.keys():\n",
|
||||
" image_dict[key] = ammico.colors.ColorDetector(image_dict[key]).analyse_image()"
|
||||
" image_dict[key] = ammico.colors.ColorDetector(image_dict[key]).analyse_image()\n",
|
||||
"\n",
|
||||
"print(\"testing signature\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Загрузка…
x
Ссылка в новой задаче
Block a user