gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.41k stars 2.53k forks source link

Upgrade the PDF component to use pdfjs express: it supports annotations and more! #6760

Closed thiswillbeyourgithub closed 10 months ago

thiswillbeyourgithub commented 10 months ago

Hi!

I noticed the documents page explaining how to create a custom PDF component that uses pdfjs.

Recently I heard about pdfjs Express which was made to be easily integrated into svelta and supports annotation and many more things. Here's their demo page

I think it could enable a lot of use case of "live" pdf reading.

abidlabs commented 10 months ago

Thanks @thiswillbeyourgithub! As this is just an example (as opposed to a core component that we are maintaining in the gradio library), we won't necessarily change it. But please feel free to create your own custom PDF component using the pdfjs, and we are happy to help share it and include it in our upcoming custom components gallery!

freddyaboulton commented 10 months ago

Hi @thiswillbeyourgithub - please feel free to open a PR to the github repo here https://github.com/freddyaboulton/gradio-pdf

thiswillbeyourgithub commented 10 months ago

Oh thanks! I don't know why but for the life of me I couldn't find the repo to gradio_pdf. The links from pypi redirected me here and github search sucks!

Unfortunately I don't know js so I won't know what I'm doing :/ so no chance of a PR from me.