h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
3.9k stars 323 forks source link

Easily Render Documents #2292

Closed mtanco closed 3 weeks ago

mtanco commented 3 months ago

Is your feature request related to a problem? Please describe

With the advent of Chat & RAG use cases over the last 18 months, we are seeing a lot of apps that want to render documents in Wave. We can do this for PDFs using HTML in a ui.text or ui.markup widget.

ui.text("<object data='https://arxiv.org/pdf/2401.16818.pdf' type='application/pdf' width='100%' height='1000px'></object>")

My understanding is that if we would like to do this for a Microsoft doc file we would need to first make the document a PDF and then render it "as normal".

Describe the solution you'd like

A native, non-custom-HTML solution for displaying PDFs and docx files

Describe alternatives you've considered

Continue to use HTML for PDFs and Python + HTML for .docx files, and "expand" Wave. My concern is this feels hacks and like Wave is not a natural fit for RAG apps

Additional context

This is coming from a customer question.

mturoci commented 3 weeks ago

Resolved by https://github.com/h2oai/wave/pull/2311.