sartajbhuvaji
commited on
Commit
•
c78c5f5
1
Parent(s):
0923eee
Update README.md
Browse files
README.md
CHANGED
@@ -34,6 +34,10 @@ classifier = pipeline("text-classification", model=classification_model, tokeniz
|
|
34 |
result = classifier("This is a great book!")
|
35 |
print(result)
|
36 |
|
|
|
|
|
|
|
|
|
37 |
# Test the pipeline on a document from a DataFrame (assuming `df` is a pandas DataFrame with text data)
|
38 |
doc_id = 1
|
39 |
doc_text = df.loc[df['DocID'] == doc_id, 'Text'].values[0]
|
|
|
34 |
result = classifier("This is a great book!")
|
35 |
print(result)
|
36 |
|
37 |
+
# Load sample dataset
|
38 |
+
dataset = load_dataset("sartajbhuvaji/gutenberg", split="100")
|
39 |
+
df = dataset.to_pandas()
|
40 |
+
|
41 |
# Test the pipeline on a document from a DataFrame (assuming `df` is a pandas DataFrame with text data)
|
42 |
doc_id = 1
|
43 |
doc_text = df.loc[df['DocID'] == doc_id, 'Text'].values[0]
|