[4/n] click-ify add detect floorplan command

run with
poetry run python main.py --step detect_floorplan
This commit is contained in:
Viktor Barzin 2025-05-11 19:06:08 +00:00
parent 70e8ef9f95
commit 48f694e002
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
2 changed files with 17 additions and 5 deletions

View file

@ -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()