Spaces:
Sleeping
Sleeping
smhavens
commited on
Commit
•
5503f0a
1
Parent(s):
4dec182
No cleaning
Browse files
app.py
CHANGED
@@ -84,15 +84,15 @@ def training():
|
|
84 |
# For agility we only 1/2 of our available data
|
85 |
n_examples = dataset["train"].num_rows // 2
|
86 |
# n_remaining = dataset["train"].num_rows - n_examples
|
87 |
-
dataset_clean = {}
|
88 |
-
# dataset_0 = []
|
89 |
-
# dataset_1 = []
|
90 |
-
# dataset_2 = []
|
91 |
-
# dataset_3 = []
|
92 |
-
for i in range(n_examples):
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
# if train_data[i]["label"] == 0:
|
97 |
# dataset_0.append(dataset_clean[i])
|
98 |
# elif train_data[i]["label"] == 1:
|
@@ -108,7 +108,7 @@ def training():
|
|
108 |
# print("Label lengths:", len(dataset_0), len(dataset_1), len(dataset_2), len(dataset_3))
|
109 |
|
110 |
for i in range(n_examples):
|
111 |
-
example =
|
112 |
# example_opposite = dataset_clean[-(i)]
|
113 |
# print(example["text"])
|
114 |
train_examples.append(InputExample(texts=[example['text']], label=example['label']))
|
|
|
84 |
# For agility we only 1/2 of our available data
|
85 |
n_examples = dataset["train"].num_rows // 2
|
86 |
# n_remaining = dataset["train"].num_rows - n_examples
|
87 |
+
# dataset_clean = {}
|
88 |
+
# # dataset_0 = []
|
89 |
+
# # dataset_1 = []
|
90 |
+
# # dataset_2 = []
|
91 |
+
# # dataset_3 = []
|
92 |
+
# for i in range(n_examples):
|
93 |
+
# dataset_clean[i] = {}
|
94 |
+
# dataset_clean[i]["text"] = normalize(train_data[i]["text"], lowercase=True, remove_stopwords=True)
|
95 |
+
# dataset_clean[i]["label"] = train_data[i]["label"]
|
96 |
# if train_data[i]["label"] == 0:
|
97 |
# dataset_0.append(dataset_clean[i])
|
98 |
# elif train_data[i]["label"] == 1:
|
|
|
108 |
# print("Label lengths:", len(dataset_0), len(dataset_1), len(dataset_2), len(dataset_3))
|
109 |
|
110 |
for i in range(n_examples):
|
111 |
+
example = train_data[i]
|
112 |
# example_opposite = dataset_clean[-(i)]
|
113 |
# print(example["text"])
|
114 |
train_examples.append(InputExample(texts=[example['text']], label=example['label']))
|