Skip to content

Commit

Permalink
dataset page fix (#1136)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottire authored Jan 24, 2024
1 parent 1a53968 commit ee9f099
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/docs/guides/core-types/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ This guide will show you how to:

```python
import weave
from weave.weaveflow import Dataset
# Initialize Weave
weave.init('intro-example')

# Create a dataset
dataset = weaveflow.Dataset([
dataset = Dataset([
{'id': '0', 'sentence': "He no likes ice cream.", 'correction': "He doesn't like ice cream."},
{'id': '1', 'sentence': "She goed to the store.", 'correction': "She went to the store."},
{'id': '2', 'sentence': "They plays video games all day.", 'correction': "They play video games all day."}
Expand All @@ -34,5 +35,5 @@ weave.publish(dataset, 'grammar')
dataset_ref = weave.ref('grammar').get()

# Access a specific example
example_label = dataset_ref.rows[2]['label']
example_label = dataset_ref.rows[2]['sentence']
```

0 comments on commit ee9f099

Please sign in to comment.