diff --git a/prompt2model/model_retriever/description_based_retriever.py b/prompt2model/model_retriever/description_based_retriever.py index d71436471..1bc060370 100644 --- a/prompt2model/model_retriever/description_based_retriever.py +++ b/prompt2model/model_retriever/description_based_retriever.py @@ -131,11 +131,10 @@ def load_model_info(self): """ if not os.path.isdir(self.model_descriptions_index_path): # If the model descriptions directory is not populated, then populate it. - urllib.request.urlretrieve( - "http://phontron.com/data/prompt2model/model_info.tgz", - "/tmp/model_info.tgz", + temporary_file, _ = urllib.request.urlretrieve( + "http://phontron.com/data/prompt2model/model_info.tgz" ) - tar = tarfile.open("/tmp/model_info.tgz") + tar = tarfile.open(temporary_file) os.makedirs(self.model_descriptions_index_path) tar.extractall(path=self.model_descriptions_index_path)