From 3889abdb6cd8c28f5b0fea0872ab7852529c2f0d Mon Sep 17 00:00:00 2001 From: Aleksandr Mokrov Date: Tue, 17 Sep 2024 20:22:59 +0200 Subject: [PATCH] Add an exception if cloning TripoSR repository is failed (#2397) CVS-152581 --- .../triposr-3d-reconstruction.ipynb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notebooks/triposr-3d-reconstruction/triposr-3d-reconstruction.ipynb b/notebooks/triposr-3d-reconstruction/triposr-3d-reconstruction.ipynb index 90134579740..f8c46f07907 100644 --- a/notebooks/triposr-3d-reconstruction/triposr-3d-reconstruction.ipynb +++ b/notebooks/triposr-3d-reconstruction/triposr-3d-reconstruction.ipynb @@ -100,11 +100,15 @@ } ], "source": [ + "import os\n", "import sys\n", "from pathlib import Path\n", "\n", "if not Path(\"TripoSR\").exists():\n", - " !git clone https://huggingface.co/spaces/stabilityai/TripoSR\n", + " exit_code = os.system(\"git clone https://huggingface.co/spaces/stabilityai/TripoSR\")\n", + "\n", + " if exit_code != 0:\n", + " raise Exception(\"Failed to clone the repository!\")\n", "\n", "sys.path.append(\"TripoSR\")" ]