Card: query with portraits.query (the build code now lives in one data-portraits repo)
Browse files
README.md
CHANGED
|
@@ -36,10 +36,10 @@ Each partition is a separate revision of this repo (tag `<stage>-p<i>of<k>`, bra
|
|
| 36 |
| codesearchnet | [`codesearchnet-p0of1`](https://huggingface.co/aalkaswan/codet5p-portrait/tree/codesearchnet-p0of1) | 6 | 42 MiB |
|
| 37 |
|
| 38 |
`partitions.json` lists the exact files (pinned dataset revisions) in each partition. Query with
|
| 39 |
-
`
|
| 40 |
|
| 41 |
```python
|
| 42 |
-
from
|
| 43 |
portrait = SequentialPortrait("aalkaswan/codet5p-portrait", ["github-code-p0of1", "codesearchnet-p0of1"])
|
| 44 |
report = portrait.contains_from_text([text], sort_chains_by_length=True)[0]
|
| 45 |
```
|
|
|
|
| 36 |
| codesearchnet | [`codesearchnet-p0of1`](https://huggingface.co/aalkaswan/codet5p-portrait/tree/codesearchnet-p0of1) | 6 | 42 MiB |
|
| 37 |
|
| 38 |
`partitions.json` lists the exact files (pinned dataset revisions) in each partition. Query with
|
| 39 |
+
`portraits.query`:
|
| 40 |
|
| 41 |
```python
|
| 42 |
+
from portraits.query import SequentialPortrait
|
| 43 |
portrait = SequentialPortrait("aalkaswan/codet5p-portrait", ["github-code-p0of1", "codesearchnet-p0of1"])
|
| 44 |
report = portrait.contains_from_text([text], sort_chains_by_length=True)[0]
|
| 45 |
```
|