зеркало из
https://github.com/ssciwr/AMMICO.git
synced 2025-10-29 21:16:06 +02:00
refactor: remove duplicated close method
Этот коммит содержится в:
родитель
a832142c44
Коммит
f277e86b29
@ -97,7 +97,7 @@ class MultimodalSummaryModel:
|
|||||||
)
|
)
|
||||||
self.model.eval()
|
self.model.eval()
|
||||||
|
|
||||||
def _close(self) -> None:
|
def close(self) -> None:
|
||||||
"""Free model resources (helpful in long-running processes)."""
|
"""Free model resources (helpful in long-running processes)."""
|
||||||
try:
|
try:
|
||||||
if self.model is not None:
|
if self.model is not None:
|
||||||
@ -120,7 +120,3 @@ class MultimodalSummaryModel:
|
|||||||
RuntimeWarning,
|
RuntimeWarning,
|
||||||
stacklevel=2,
|
stacklevel=2,
|
||||||
)
|
)
|
||||||
|
|
||||||
def close(self) -> None:
|
|
||||||
"""Free model resources (helpful in long-running processes)."""
|
|
||||||
self._close()
|
|
||||||
|
|||||||
@ -1458,7 +1458,9 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"for key in image_dict.keys():\n",
|
"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