[4/n] click-ify add detect floorplan command
run with poetry run python main.py --step detect_floorplan
This commit is contained in:
parent
70e8ef9f95
commit
48f694e002
2 changed files with 17 additions and 5 deletions
|
|
@ -1,9 +1,19 @@
|
|||
from data_access import Listing
|
||||
from tqdm import tqdm
|
||||
|
||||
listings = Listing.get_all_listings()
|
||||
|
||||
for listing in tqdm(listings):
|
||||
tqdm.write(str(listing.identifier))
|
||||
# listing.calculate_sqm_model() # using google/deplot model. Too slow, rather use tesseract
|
||||
listing.calculate_sqm_ocr(recalculate=False)
|
||||
def detect_floorplan():
|
||||
listings = Listing.get_all_listings()
|
||||
|
||||
for listing in tqdm(listings):
|
||||
tqdm.write(str(listing.identifier))
|
||||
# listing.calculate_sqm_model() # using google/deplot model. Too slow, rather use tesseract
|
||||
listing.calculate_sqm_ocr(recalculate=False)
|
||||
|
||||
|
||||
def main():
|
||||
detect_floorplan()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@ import importlib
|
|||
dump_listings_module = importlib.import_module('1_dump_listings')
|
||||
dump_detail_module = importlib.import_module('2_dump_detail')
|
||||
dump_images_module = importlib.import_module('3_dump_images')
|
||||
detect_floorplan_module = importlib.import_module('4_detect_floorplan')
|
||||
|
||||
steps_to_handlers = {
|
||||
'dump_listings': dump_listings_module.dump_listings,
|
||||
'dump_detail': dump_detail_module.dump_detail,
|
||||
'dump_images': dump_images_module.dump_images,
|
||||
'detect_floorplan': detect_floorplan_module.detect_floorplan,
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue