Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,11 +13,10 @@ detection_model = AutoDetectionModel.from_pretrained(
|
|
13 |
device="cpu" # Change to 'cuda:0' if you have a GPU
|
14 |
)
|
15 |
|
16 |
-
OUTPUT_PATH = "./
|
17 |
-
TEMP_PNG_PATH = "./
|
18 |
|
19 |
def run_inference(image):
|
20 |
-
Path("./outputs").mkdir(parents=True, exist_ok=True) # Ensure output directory exists
|
21 |
result = get_sliced_prediction(
|
22 |
image,
|
23 |
detection_model,
|
|
|
13 |
device="cpu" # Change to 'cuda:0' if you have a GPU
|
14 |
)
|
15 |
|
16 |
+
OUTPUT_PATH = "./pred_image.jpg"
|
17 |
+
TEMP_PNG_PATH = "./pred_image.png"
|
18 |
|
19 |
def run_inference(image):
|
|
|
20 |
result = get_sliced_prediction(
|
21 |
image,
|
22 |
detection_model,
|