Fix requests connection error during modelcard creation (#26518)

fix requests connection error

Co-authored-by: Jan Philipp Harries <jphme@users.noreply.github.com>
This commit is contained in:
Jan Philipp Harries 2023-10-02 10:52:51 +02:00 committed by GitHub
parent ca0379b8c8
commit 7d77d7f79c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -387,7 +387,7 @@ class TrainingSummary:
for tag in info.tags:
if tag.startswith("license:"):
self.license = tag[8:]
except (requests.exceptions.HTTPError, HFValidationError):
except (requests.exceptions.HTTPError, requests.exceptions.ConnectionError, HFValidationError):
pass
def create_model_index(self, metric_mapping):