Card: query with portraits.query (the build code now lives in one data-portraits repo)
Browse files
README.md
CHANGED
|
@@ -20,10 +20,10 @@ Each partition is a separate revision of this repo (tag `p<i>of<k>`, branch `par
|
|
| 20 |
| [`p0of1`](https://huggingface.co/aalkaswan/redpajama-github-portrait/tree/p0of1) | 98 | github | 4.0 GiB |
|
| 21 |
|
| 22 |
`partitions.json` lists the exact files (URL, size and ETag; URL list at a pinned Hub revision) in each partition. Query with
|
| 23 |
-
`
|
| 24 |
|
| 25 |
```python
|
| 26 |
-
from
|
| 27 |
portrait = SequentialPortrait("aalkaswan/redpajama-github-portrait", ["p0of1"])
|
| 28 |
report = portrait.contains_from_text([text], sort_chains_by_length=True)[0]
|
| 29 |
```
|
|
|
|
| 20 |
| [`p0of1`](https://huggingface.co/aalkaswan/redpajama-github-portrait/tree/p0of1) | 98 | github | 4.0 GiB |
|
| 21 |
|
| 22 |
`partitions.json` lists the exact files (URL, size and ETag; URL list at a pinned Hub revision) in each partition. Query with
|
| 23 |
+
`portraits.query`:
|
| 24 |
|
| 25 |
```python
|
| 26 |
+
from portraits.query import SequentialPortrait
|
| 27 |
portrait = SequentialPortrait("aalkaswan/redpajama-github-portrait", ["p0of1"])
|
| 28 |
report = portrait.contains_from_text([text], sort_chains_by_length=True)[0]
|
| 29 |
```
|