Skip to content

Commit d0aa573

Browse files
committed
Update tokenizing_test.py
1 parent 6fa5d95 commit d0aa573

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tokenizing_test.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import pandas as pd
55

66
def main(data_path: str):
7+
print("import matplotlib")
8+
import matplotlib.pyplot as plt
79
print("Loading Tokenizer")
810
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
911

@@ -13,7 +15,11 @@ def main(data_path: str):
1315
print(f"df head:\n {df.head()}\n")
1416
print(f"df tail:\n {df.tail()}\n")
1517

16-
return
18+
19+
df[0].apply(lambda x: len(x)).hist()
20+
plt.savefig("test_plot.png")
21+
22+
return
1723

1824
print(df.info())
1925
print("Converting data to list")

0 commit comments

Comments
 (0)