original_docstring: Convert a pdffigures output figure to a Figure object
docstring: Convert a pdffigures output figure to a Figure object
docstring_tokens: Convert a pdffigures output figure to a Figure object
code: def from_pf_output(res: dict, target_dpi=DEFAULT_INFERENCE_DPI) -> 'Figure':
          """Convert a pdffigures output figure to a Figure object"""
          scale_factor = target_dpi / 72
          return Figure(
              figure_boundary=BoxClass.from_dict(res['regionBoundary']
                                                ).rescale(scale_factor),
              caption_boundary=BoxClass.from_dict(res['captionBoundary'])
              .rescale(scale_factor),
              caption_text=res['caption'],
              name=res['name'],
              page=res['page'],
              figure_type=res['figType']
          )
code_tokens: def from_pf_output ( res : dict , target_dpi = DEFAULT_INFERENCE_DPI ) -> 'Figure' : scale_factor = target_dpi / 72 return Figure ( figure_boundary = BoxClass . from_dict ( res [ 'regionBoundary' ] ) . rescale ( scale_factor ) , caption_boundary = BoxClass . from_dict ( res [ 'captionBoundary' ] ) . rescale ( scale_factor ) , caption_text = res [ 'caption' ] , name = res [ 'name' ] , page = res [ 'page' ] , figure_type = res [ 'figType' ] )
short_docstring: Convert a pdffigures output figure to a Figure object
short_docstring_tokens: Convert a pdffigures output figure to a Figure object
comment: """Convert a pdffigures output figure to a Figure object"""