removed duration limit
Browse files
inference_tab/inference_logic.py
CHANGED
|
@@ -193,7 +193,7 @@ def getBBoxes(image_path, tile_size=256, overlap=0.3, confidence_threshold=0.25)
|
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
-
@spaces.GPU
|
| 197 |
def run_tile_inference():
|
| 198 |
model = SAM("mobile_sam.pt") # sam2.1_l.pt
|
| 199 |
Path("tmp/masks").mkdir(parents=True, exist_ok=True)
|
|
@@ -337,7 +337,7 @@ def blobsOCR(image_path):
|
|
| 337 |
except Exception as e:
|
| 338 |
yield f"Error processing {filename}: {e}"'''
|
| 339 |
|
| 340 |
-
@spaces.GPU
|
| 341 |
def blobsOCR_chunk(image_paths):
|
| 342 |
"""Run OCR on a list of images (one chunk)."""
|
| 343 |
processor, model = load_trocr_model()
|
|
|
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
+
@spaces.GPU
|
| 197 |
def run_tile_inference():
|
| 198 |
model = SAM("mobile_sam.pt") # sam2.1_l.pt
|
| 199 |
Path("tmp/masks").mkdir(parents=True, exist_ok=True)
|
|
|
|
| 337 |
except Exception as e:
|
| 338 |
yield f"Error processing {filename}: {e}"'''
|
| 339 |
|
| 340 |
+
@spaces.GPU
|
| 341 |
def blobsOCR_chunk(image_paths):
|
| 342 |
"""Run OCR on a list of images (one chunk)."""
|
| 343 |
processor, model = load_trocr_model()
|