nlmatics / llmsherpa

Developer APIs to Accelerate LLM Projects
https://www.nlmatics.com
MIT License
1.37k stars 134 forks source link

llmsherpa api url #32

Open reema93jain opened 10 months ago

reema93jain commented 10 months ago

Hi Team,

I am trying to parse pdf using llmsherpa LayoutPDFReader When I pass below llmsherpa api url to LayoutPDFReader its giving error saying host is not found.

Can you please tell if below is correct api url for llmsherpa?

llmsherpa_api_url = "https://readers.llmsherpa.com/api/document/developer/parseDocument?renderFormat=all"

I also pasted link in url, its showing below error:

image

Thank you Reema Jain

asukla commented 10 months ago

Hi Reema - This URL is not supposed to be put in the browser. Can you please try the code here and see if this works for you: https://colab.research.google.com/drive/1hx5Y2TxWriAuFXcwcjsu3huKyn39Q2id?usp=sharing

reema93jain commented 10 months ago

Hi Asukla,

I tried code on colab. It seems like it worked but its not printing any contents of pdf file. Can you please tell how I can print the contents?

Code below: image

Thank you Reema

kiran-nlmatics commented 10 months ago

Hello Reema,

The output of "read_pdf" is layout_reader.Document object. In the colab link that @asukla shared, you can find the snippet to print sections.

image

API reference documentation is available @ https://llmsherpa.readthedocs.io/