Spaces:
Runtime error
Runtime error
Update load_data.py
Browse files- load_data.py +4 -4
load_data.py
CHANGED
@@ -20,7 +20,7 @@ HUB_DATASET_NAME = os.environ.get('HUB_DATASET_NAME') #get dataset name
|
|
20 |
)
|
21 |
def save_validated_to_hub(records, ctx):
|
22 |
if len(records) > 0:
|
23 |
-
ds = rg.
|
24 |
if HF_TOKEN:
|
25 |
print("Pushing the dataset")
|
26 |
print(ds)
|
@@ -57,9 +57,9 @@ class LoadDatasets:
|
|
57 |
dataset = dataset.remove_columns("metrics")
|
58 |
records = rg.DatasetForTokenClassification.from_datasets(dataset)
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
rg.configure_dataset(name="job-title-tagging", settings=settings, workspace="team")
|
64 |
|
65 |
# Log the dataset
|
|
|
20 |
)
|
21 |
def save_validated_to_hub(records, ctx):
|
22 |
if len(records) > 0:
|
23 |
+
ds = rg.DatasetForTokenClassification(records=records).to_datasets()
|
24 |
if HF_TOKEN:
|
25 |
print("Pushing the dataset")
|
26 |
print(ds)
|
|
|
57 |
dataset = dataset.remove_columns("metrics")
|
58 |
records = rg.DatasetForTokenClassification.from_datasets(dataset)
|
59 |
|
60 |
+
settings = rg.TokenClassificationSettings(
|
61 |
+
label_schema=["B-FUN", "I-FUN", "B-RES", "I-RES", "B-LEVEL", "I-LEVEL"]
|
62 |
+
)
|
63 |
rg.configure_dataset(name="job-title-tagging", settings=settings, workspace="team")
|
64 |
|
65 |
# Log the dataset
|