Skip to content

Commit

Permalink
use cfg for XMLRegions
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanklut committed Mar 22, 2024
1 parent eea7db7 commit 274d48e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions api/flask_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,7 @@ def setup_model(self, model_name: str, args: DummyArgs):
args.opts = ["TEST.WEIGHTS", str(weights_paths[0])]

cfg = setup_cfg(args)
xml_regions = XMLRegions(
mode=cfg.MODEL.MODE,
line_width=cfg.PREPROCESS.BASELINE.LINE_WIDTH,
regions=cfg.PREPROCESS.REGION.REGIONS,
merge_regions=cfg.PREPROCESS.REGION.MERGE_REGIONS,
region_type=cfg.PREPROCESS.REGION.REGION_TYPE,
)
xml_regions = XMLRegions(cfg)
self.gen_page = OutputPageXML(xml_regions=xml_regions, output_dir=None, cfg=cfg, whitelist={})

self.predictor = Predictor(cfg=cfg)
Expand Down

0 comments on commit 274d48e

Please sign in to comment.