Skip to content

Commit

Permalink
Update 'Create datasets from query' example and capitalization of Dat…
Browse files Browse the repository at this point in the history
…aChain (#5286)

* fix: Update the 'Create datasets from queries' example

* Fix capitalization of 'DataChain'
  • Loading branch information
djsauble authored Jul 24, 2024
1 parent d9cc8a1 commit 298ed3a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions content/data/datachain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
prompt = "How many people in the image?"
people = Dataset("s3://my-storage/") \
.filter(C.name.glob("*.jpg")) \
.map(DescribeImage(prompt, max_token = 300)) \
.mutate(num_people = int(C.descr))
people = DataChain.from_storage("s3://my-storage/", type="image") \
.filter(C.name.glob("*.jpg")) \
.map(DescribeImage(prompt, max_token = 300)) \
.mutate(num_people = int(C.descr))
people.filter(C.num_people > 3)
Expand All @@ -21,6 +21,9 @@
Save the results of a query in a dataset that you can use to train your ML
models.
terminal: |
$ datachain query my-query.py my-dataset
..........
Dataset 'my-dataset' created
from datachain.lib.dc import C, DataChain
images = DataChain.from_storage("s3://my-storage/", type="image") \
.filter(C.name.glob("*.jpg"))
images.save("fashion-product-images")
2 changes: 1 addition & 1 deletion src/components/Home/Hero/BetterTogether/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const BetterTogether = () => {
return (
<HeroContainer className="py-14 bg-blue-100">
<h2 className={cn('text-center text-3xl font-medium')}>
Datachain and DVC: Better Together
DataChain and DVC: Better Together
</h2>
<p className={cn('mt-8', 'text-xl font-normal')}>
Build the datasets you need without modifying your data sources. Create
Expand Down
2 changes: 1 addition & 1 deletion src/components/Home/Hero/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const HeroSection = () => {
})
}}
>
<span>Learn about Datachain</span>
<span>Learn about DataChain</span>
<ArrowDown className="w-4 md:w-6 animate-bounce" />
</CTAButton>
</Section>
Expand Down

0 comments on commit 298ed3a

Please sign in to comment.