Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ ANNOTATION_THICKNESS = 4 # Thickness of bounding box lines
|
|
25 |
repo_id = 'edeler/ICC' # Replace with your Hugging Face repository ID
|
26 |
model_dir = snapshot_download(repo_id, local_dir='./models/ICC')
|
27 |
model_path = os.path.join(model_dir, "best.pt") # Adjust if filename differs
|
28 |
-
model = YOLO(model_path).to(
|
29 |
|
30 |
# Define the detection function for Gradio
|
31 |
def detect_objects(image: np.ndarray) -> Image.Image:
|
|
|
25 |
repo_id = 'edeler/ICC' # Replace with your Hugging Face repository ID
|
26 |
model_dir = snapshot_download(repo_id, local_dir='./models/ICC')
|
27 |
model_path = os.path.join(model_dir, "best.pt") # Adjust if filename differs
|
28 |
+
model = YOLO(model_path).to(device)
|
29 |
|
30 |
# Define the detection function for Gradio
|
31 |
def detect_objects(image: np.ndarray) -> Image.Image:
|