NNNan commited on
Commit
cf99257
·
verified ·
1 Parent(s): ad12f54

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -0
README.md CHANGED
@@ -63,6 +63,15 @@ You can randomly sample one term from each of the nine attribute categories defi
63
 
64
  ```python
65
  # Sampled attributes from UniEM-3M
 
 
 
 
 
 
 
 
 
66
 
67
 
68
  # Construct the prompt
 
63
 
64
  ```python
65
  # Sampled attributes from UniEM-3M
66
+ from collections import defaultdict
67
+ from datasets import load_dataset
68
+
69
+ attribute_values = defaultdict(set)
70
+ dataset = load_dataset('NNNan/UniEM-3M')
71
+
72
+ for attr_dict in dataset['synthesized_data_structured_descriptions']['attribute_description']:
73
+ for key, value in attr_dict.items():
74
+ attribute_values[key].add(value)
75
 
76
 
77
  # Construct the prompt