Skip to content

Commit

Permalink
[enh] Add support for large_string in model card create
Browse files Browse the repository at this point in the history
  • Loading branch information
yaohwang authored Oct 18, 2024
1 parent 1802076 commit 9f61e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentence_transformers/model_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def set_widget_examples(self, dataset: Dataset | DatasetDict) -> None:
columns = [
column
for column, feature in dataset[dataset_name].features.items()
if isinstance(feature, Value) and feature.dtype == "string" and column != "dataset_name"
if isinstance(feature, Value) and (feature.dtype == "string" or feature.dtype == "large_string") and column != "dataset_name"
]
str_dataset = dataset[dataset_name].select_columns(columns)
dataset_size = len(str_dataset)
Expand Down

0 comments on commit 9f61e38

Please sign in to comment.