| import deepdoctection as dd | |
| from IPython.core.display import HTML | |
| from matplotlib import pyplot as plt | |
| analyzer = dd.get_dd_analyzer() # instantiate the built-in analyzer similar to the Hugging Face space demo | |
| df = analyzer.analyze(path = "/content/imgs") # setting up pipeline | |
| df.reset_state() # Trigger some initialization | |
| for pg in iter(df): | |
| image = pg.viz() | |
| plt.figure(figsize = (25,17)) | |
| plt.axis('off') | |
| plt.imshow(image) | |
| for idx in range(len(pg.tables)): | |
| HTML(pg.tables[idx].html) |