label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

Can data upload support pdf and word? Currently, only txt is supported.

Open yysturdy opened this issue 11 months ago • 3 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

yysturdy avatar Mar 17 '24 12:03 yysturdy

You'd import those as URLs and embed viewing those documents using HyperText tag. Take a look at "Rate PDF" example in Playground: https://labelstud.io/playground/

deppp avatar Mar 20 '24 04:03 deppp

@deppp How should we import the URLs with the embed?

For example, I'm seeking:

{
    "pdf": "<embed src='https://app.heartex.ai/static/samples/sample.pdf' width='100%' height='600px'/>"
}

I tried saving a text file containing just: <embed src='https://app.heartex.ai/static/samples/sample.pdf' width='100%' height='600px'/> as "sample_pdf_url.txt" and importing it.

However, it shows up like this:

{
    "pdf": "/data/upload/1/4de68584-sample_pdf_url.txt"
}

Is there a way to ensure the embed tag itself is read and displayed instead of just showing the file path? Thanks!

pbanuru avatar May 05 '24 05:05 pbanuru

I found the solution!:

solution is to put the entire:

{
    "pdf": "<embed src='https://app.heartex.ai/static/samples/sample.pdf' width='100%' height='600px'/>"
}

in a .json file, and import it.

pbanuru avatar May 05 '24 10:05 pbanuru

Closed as a non-active issue, and it seems like it has been resolved.

makseq avatar Sep 09 '24 13:09 makseq