Souvik3333 commited on
Commit
d56c35b
·
verified ·
1 Parent(s): 6960559

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -0
README.md CHANGED
@@ -276,7 +276,25 @@ Check out [Docstrange](https://docstrange.nanonets.com/) for more details.
276
  </tbody>
277
  </table>
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
 
 
 
 
280
 
281
 
282
  ## BibTex
 
276
  </tbody>
277
  </table>
278
 
279
+ ## Tips to improve accuracy
280
+ 1. Increasing the image resolution will improve model's performance.
281
+ 2. For complex tables (eg. finantial documents) using `repetition_penalty=1` gives better results. You can try this prompt also, which generally works better for finantial documents.
282
+ ```python
283
+ user_prompt = """Extract the text from the above document as if you were reading it naturally. Return the tables in html format. Return the equations in LaTeX representation. If there is an image in the document and image caption is not present, add a small description of the image inside the <img></img> tag; otherwise, add the image caption inside <img></img>. Watermarks should be wrapped in brackets. Ex: <watermark>OFFICIAL COPY</watermark>. Page numbers should be wrapped in brackets. Ex: <page_number>14</page_number> or <page_number>9/22</page_number>. Prefer using ☐ and ☑ for check boxes."""
284
+ ```
285
+ 3. This is already implemented in [Docstrange](https://docstrange.nanonets.com/?output_type=markdown-financial-docs), please use the `Markdown (Finantial Docs)` option for processing table heavy finantial documents.
286
+ ```python
287
+ import requests
288
+
289
+ url = "https://extraction-api.nanonets.com/extract"
290
+ headers = {"Authorization": <API KEY>}
291
+
292
+ files = {"file": open("/path/to/your/file", "rb")}
293
+ data = {"output_type": "markdown-financial-docs"}
294
 
295
+ response = requests.post(url, headers=headers, files=files, data=data)
296
+ print(response.json())
297
+ ```
298
 
299
 
300
  ## BibTex