Spaces:
Sleeping
Sleeping
Update pest/mcp_output/mcp_plugin/mcp_service.py
Browse files
pest/mcp_output/mcp_plugin/mcp_service.py
CHANGED
|
@@ -47,13 +47,13 @@ def preprocess_image_tool(image_path: str) -> dict:
|
|
| 47 |
return {"success": False, "result": None, "error": str(e)}
|
| 48 |
|
| 49 |
@mcp.tool(name="detect_pest", description="Detect pests in an image using the loaded model")
|
| 50 |
-
def detect_pest_tool(model:
|
| 51 |
"""
|
| 52 |
Detect pests in an image using the loaded model.
|
| 53 |
|
| 54 |
Parameters:
|
| 55 |
-
model (
|
| 56 |
-
image_data (
|
| 57 |
|
| 58 |
Returns:
|
| 59 |
dict: A dictionary containing success status and detection results.
|
|
|
|
| 47 |
return {"success": False, "result": None, "error": str(e)}
|
| 48 |
|
| 49 |
@mcp.tool(name="detect_pest", description="Detect pests in an image using the loaded model")
|
| 50 |
+
def detect_pest_tool(model: dict, image_data: dict) -> dict:
|
| 51 |
"""
|
| 52 |
Detect pests in an image using the loaded model.
|
| 53 |
|
| 54 |
Parameters:
|
| 55 |
+
model (dict): The loaded pest detection model.
|
| 56 |
+
image_data (dict): Preprocessed image data.
|
| 57 |
|
| 58 |
Returns:
|
| 59 |
dict: A dictionary containing success status and detection results.
|