Open severo opened 1 month ago
The priority is to have the PDF type detection and thumbnail IMO.
One way to tackle this is to add the PDF type detection in datasets
for the bytes case. This way it will be easy to:
pypdfium2
)pypdfium2
Then for the URL case we can extend the image URL detection in step in the viewer, but I'm not sure if it's possible to render a thumbnail of a PDF in JS from a URL ?
I'm not sure if it's possible to render a thumbnail of a PDF in JS from a URL
good point, we can't do the same here.
In that case, we would generate an image (thumbnail of the first page), stored as an asset, to populate /first-rows and /rows and display in the dataset viewer.
asked internally on Slack: https://huggingface.slack.com/archives/C064HCHEJ2H/p1721215883166569 cc @Pleias