fix: add package
This commit is contained in:
@@ -136,4 +136,3 @@ class ImageProcessor:
|
||||
buffer.seek(0)
|
||||
|
||||
return base64.b64encode(buffer.getvalue()).decode("utf-8")
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
import numpy as np
|
||||
|
||||
from app.schemas.image import LayoutInfo, LayoutRegion
|
||||
from app.core.config import get_settings
|
||||
|
||||
settings = get_settings()
|
||||
|
||||
|
||||
class LayoutDetector:
|
||||
@@ -73,7 +76,7 @@ class LayoutDetector:
|
||||
image,
|
||||
imgsz=image_size,
|
||||
conf=self.confidence_threshold,
|
||||
device="cuda:0",
|
||||
device=settings.device,
|
||||
)
|
||||
|
||||
regions: list[LayoutRegion] = []
|
||||
|
||||
Reference in New Issue
Block a user