Spaces:
Sleeping
Sleeping
increase duration
Browse files
app.py
CHANGED
|
@@ -13,10 +13,10 @@ from paladin import run_paladin
|
|
| 13 |
|
| 14 |
NUM_WORKERS = int(os.getenv("NUM_WORKERS", 2))
|
| 15 |
|
| 16 |
-
@spaces.GPU
|
| 17 |
def get_features_and_infer(coords, slide_path, attrs, site_type):
|
| 18 |
use_gpu = torch.cuda.is_available()
|
| 19 |
-
features, _ = get_features(coords, slide_path, attrs, model_type=ModelType.OPTIMUS, use_gpu=use_gpu, batch_size=
|
| 20 |
|
| 21 |
# Step 3: Run Aeon to predict histology
|
| 22 |
aeon_results, _ = run_aeon(
|
|
|
|
| 13 |
|
| 14 |
NUM_WORKERS = int(os.getenv("NUM_WORKERS", 2))
|
| 15 |
|
| 16 |
+
@spaces.GPU(duration=300)
|
| 17 |
def get_features_and_infer(coords, slide_path, attrs, site_type):
|
| 18 |
use_gpu = torch.cuda.is_available()
|
| 19 |
+
features, _ = get_features(coords, slide_path, attrs, model_type=ModelType.OPTIMUS, use_gpu=use_gpu, batch_size=256, num_workers=NUM_WORKERS)
|
| 20 |
|
| 21 |
# Step 3: Run Aeon to predict histology
|
| 22 |
aeon_results, _ = run_aeon(
|