Skip to content

Commit

Permalink
fix dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
redur committed Apr 4, 2024
1 parent c430f15 commit 3521401
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/stratigraphy/line_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ def draw_lines_on_page(filename: str, page: fitz.Page, geometric_lines: list[Lin
"""
if not mlflow_tracking:
logger.warning("MLFlow tracking is not enabled. MLFLow is required to store the images.")
import mlflow

img = plot_lines(page, geometric_lines, scale_factor=line_detection_params["pdf_scale_factor"])
mlflow.log_image(img, f"pages/{filename}_page_{page.number + 1}_lines.png")
else:
import mlflow

img = plot_lines(page, geometric_lines, scale_factor=line_detection_params["pdf_scale_factor"])
mlflow.log_image(img, f"pages/{filename}_page_{page.number + 1}_lines.png")

0 comments on commit 3521401

Please sign in to comment.