Skip to content

Commit

Permalink
Fix requests connection error during modelcard creation (huggingface#…
Browse files Browse the repository at this point in the history
…26518)

fix requests connection error

Co-authored-by: Jan Philipp Harries <[email protected]>
  • Loading branch information
2 people authored and blbadger committed Nov 8, 2023
1 parent 1eee66b commit 883676b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/modelcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def __post_init__(self):
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):
Expand Down

0 comments on commit 883676b

Please sign in to comment.